Skip to content
New issue

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

[FEATURE REQUEST] Should return unix timestamp #30

Closed
GoogleCodeExporter opened this issue Mar 9, 2016 · 1 comment
Closed

[FEATURE REQUEST] Should return unix timestamp #30

GoogleCodeExporter opened this issue Mar 9, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Hello,

I just wanted to point out that this library would be very useful if it
returned back unix timestamps and other date formats compatible with other
systems.

Thank you.

Original issue reported on code.google.com by jake.c...@gmail.com on 18 Feb 2008 at 8:33

@GoogleCodeExporter
Copy link
Author

Hi Jake,

Can you provide a sample string of what you expect a unix timestamp would look 
like?
I did some research and there's differing opinion on what some consider a 
modern unix
timestamp.

If you mean ISO 8601 format, then the current library includes almost full 
support.
See http://datejs.com/test/date_and_time/ (scroll down to bottom). We also 
include
.toISOString(). Most of the ISO 8601 support was added to Datejs after the 
Alpha-1
release, so you'll need to grab the bits from SVN if you want the latest code.

If you mean unix timestamp to be the number of seconds from epoch, then you 
don't
really need Datejs because that functionality is included natively in 
JavaScript.
(new Date().getTime / 1000)

For my own reference, I'm adding the following links I used for research.

http://www.unixtimestamp.com/index.php
http://en.wikipedia.org/wiki/Unix_time
http://en.wikipedia.org/wiki/ISO_8601
http://www.esqsoft.com/javascript_examples/date-to-epoch.htm
http://soft.zoneo.net/Unixtime/index.php
http://www.timestampgenerator.com/ 



Original comment by geoff%co...@gtempaccount.com on 19 Feb 2008 at 9:18

  • Changed title: [FEATURE REQUEST] Should return unix timestamp
  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant