Feature Request: Support dates with negative years (i.e. BCE)
See original GitHub issueI have tried to create DateTime
objects in BCE, for example like this DateTime.parseISO('-7000-0-0')
or DateTime.fromFormat('-7000', 'yyyyy'). However, they all have
NaN` as year.
How can I create such dates?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Negative Dates (i.e. years BCE/BC) - AcrobatFAQ.com
Negative integers from -1 to -2500, when coerced to dates, are interpreted as years BCE (or BC). This is particularly useful for timeline...
Read more >Storing Negative-Dates to Represent BC/BCE (vs AD/CE) in ...
How precise does your storage need to be? Is it years, days, or hours/minutes. If you are only looking at Days or Years,...
Read more >Date - JavaScript - MDN Web Docs - Mozilla
Chrome Edge
Date Full support. Chrome1. Toggle history Full support. Edge12. Toggle hist...
@@toPrimitive Full support. Chrome47. Toggle history Full support. Edge15. Toggle hist...
Date() constructor...
Read more >Feature request response email templates - LiveAgent
Receiving feature requests should not be viewed as negative feedback. In fact, it means that your customers care enough to share their ideas...
Read more >Sales Tax API Reference - TaxJar Developers
If you have any questions or would like to request support for a new ... TaxJar has introduced API versioning to deliver enhanced...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try:
luxon.DateTime.fromObject({year:-1234, month:9, day:25}).toLocaleString({ ...luxon.DateTime.DATE_FULL, era: "short" })
-> “September 24, 1235 BC”See “era” options at: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
I don’t see a way to include year notation, ie
BCE
,AD
when I invoketoLocaleString()
. Does this exist?