-
Notifications
You must be signed in to change notification settings - Fork 2
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
Implement "date:[]" macro #371
Comments
I don't regard this currently as high priority. |
Format will be: date:FORMAT[content] where FORMAT is one of the accepted date format representations from strftime Need to recover internationalised month and day names from twitter_cldr_rb, but it won't be easy, they are only present abbreviated in DateTime.now.localize(:ja).to_additional_s("E"/"MMM"). Can construct them from pure calendar: TwitterCldr::Shared::Calendar.new(:de).months(:wide), TwitterCldr::Shared::Calendar.new(:de).weekdays(:narrow) https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html Lookup via %-m and %a.downcase.to_i Will map to: |
The format string needs an escape for space, since it must be a string without space. That escape shall be %_ The macro format is instead date:[VALUE], date:[VALUE,FORMAT], with %F as the default supplied format. |
In relation to metanorma/metanorma-bipm#38 (comment)
Implement
date:[...]
for localize date formats.The text was updated successfully, but these errors were encountered: