Closed solomonhawk closed 8 years ago
I think I would like to include some parse methods that could be modularly imported and used. something like import parse from 'ca11y/parse'
In addition to returning the js date object, I'm going to return the following key/value pairs that should make it pretty easy to format your date however you want.
key | value |
---|---|
d | Day of the month as digits; no leading zero for single-digit days. |
dd | Day of the month as digits; leading zero for single-digit days. |
ddd | Day of the week as a three-letter abbreviation. |
dddd | Day of the week as its full name. |
m | Month as digits; no leading zero for single-digit months. |
mm | Month as digits; leading zero for single-digit months. |
mmm | Month as a three-letter abbreviation. |
mmmm | Month as its full name. |
yy | Year as last two digits; leading zero for years less than 10. |
yyyy | Year represented by four digits. |
Format naming seems pretty universal, but I grabbed it from here specifically: http://blog.stevenlevithan.com/archives/date-time-format
Related to #13
Purpose:
Allow users to override the default date parsing and formatting that Ca11y does.
Implementation:
This could be entirely left to userland code as Dan outlined in #13.