Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let dateObject;
- // InitialCreationDateTime contains the DateTime object that I have received from the back-end
- if (this.initialCreationDateTime != null) {
- dateObject = new Date(this.initialCreationDateTime);
- } else {
- dateObject = new Date();
- }
- // InitialCreationDateTime is nothing more then a string variable to store the final date string
- this.initialCreationDateTimeString = dateObject.getHours() + ':' + ((dateObject.getMinutes() < 10 ? '0' : '') + dateObject.getMinutes()) + 'xa0xa0' + dateObject.getDate() + '-' + (dateObject.getMonth() + 1) + '-' + dateObject.getFullYear();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement