We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require('datejs'); var format1 = "s"; var format2 = "ss"; var format3 = "hh:mm:s" var myDate = new Date(); console.log("One s: "+myDate.toString(format1)); console.log("Two s: "+myDate.toString(format2)); console.log("Formatted hh:mm:s: "+myDate.toString(format3));
Results are: [coreyivr]# node myDate.js One s: 2016-10-14T09:59:21 Two s: 21 Formatted hh:mm:s: 09:59:21
It's an easy enough fix in my code (just use ss and strip the zero if there is one), but it would be nice to get this fixed in the library.
edit:
A similar situation arises with just one m as well.
require('datejs'); var format1 = "m"; var format2 = "mm"; var format3 = "hh:m:s" var myDate = Date.parse("October 14th, 2016 10:03 PM"); console.log("One m: "+myDate.toString(format1)); console.log("Two m: "+myDate.toString(format2)); console.log("Formatted hh:m:s: "+myDate.toString(format3));
Results: One m: October 14 Two m: 03 Formatted hh:m:s: 10:3:0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Results are:
[coreyivr]# node myDate.js
One s: 2016-10-14T09:59:21
Two s: 21
Formatted hh:mm:s: 09:59:21
It's an easy enough fix in my code (just use ss and strip the zero if there is one), but it would be nice to get this fixed in the library.
edit:
A similar situation arises with just one m as well.
Results:
One m: October 14
Two m: 03
Formatted hh:m:s: 10:3:0
The text was updated successfully, but these errors were encountered: