Moment.js gives non-refundable answers in the format

I have two instant objects:

> calEvent.start
Moment {_isAMomentObject: true, _i: "2015-06-11T11:00:00", _f: "YYYY-MM-DDTHH:mm:ss", _isUTC: false, _pf: Object…}_ambigTime: false_ambigZone: false_d: Thu Jun 11 2015 11:00:00 GMT+0300 (EEST)_f: "YYYY-MM-DDTHH:mm:ss"_fullCalendar: true_i: "2015-06-11T11:00:00"_isAMomentObject: true_isUTC: false_isValid: true_locale: f_offset: 0_pf: Object__proto__: Moment

> dateTime.startDT
Moment {_isAMomentObject: true, _i: "Th, 11-06-2015 11:00", _f: "dd, DD-MM-YYYY HH:mm", _isUTC: false, _pf: Object…}_d: Thu Jun 11 2015 11:00:00 GMT+0300 (EEST)_f: "dd, DD-MM-YYYY HH:mm"_i: "Th, 11-06-2015 11:00"_isAMomentObject: true_isUTC: false_isValid: true_locale: Object_pf: Object__proto__: Moment

      

When I format two moment objects with the same string, it gives different answers:

> calEvent.start.format('YYYY-MM-DDTHH:mm')
"2015-06-11A11:00"
           ^
           A? what is that? i was expecting 'T'

> dateTime.startDT.format('YYYY-MM-DDTHH:mm')
"2015-06-11T11:00"
           ^
           This is correct one for me.

      

I tried to figure out what is different between these objects and why moment.js converts T to A.

+3
javascript time momentjs


source to share


No one has answered this question yet

Check out similar questions:

5129
How do I return a response from an asynchronous call?
3915
Why does Google add while (1); into your JSON responses?
1865
How to format a JavaScript date
603
Moment.js convert object to date
4
Moment.js gives incorrect difference between 2 dates
3
Adding days to a Moment object (momentjs)
0
Firefox vs Chrome Date Difference with momentJS
0
Convert date and time to time.js with timezone
0
Moment.js problem with invalid date
0
Date formatting using angular-moment.js



All Articles
Loading...
X
Show
Funny
Dev
Pics