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
Hey @cormacrelf.
While it's not formally part of the spec, thought I might suggest including this anyway, per EDTF.js.
inukshuk/edtf.js#12
Also, on a simpler note, can you show how to format the parsed dates, and maybe add it to the usage section?
I'm wanting to implement localized level 1 support in a project I'm working on, and am lost.
Here's the typescript prototype code I'm wanting to convert to Rust:
formatDate(date: string, options: Intl.DateTimeFormatOptions): string { const parsedDate = edtf.default(date); const year = parsedDate.year.toString(); const optKeys = Object.keys(options); const useYear = optKeys.includes("year") && optKeys.length === 1; const formattedDate = useYear ? year : edtf.format(parsedDate, "en-US", options); return formattedDate; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey @cormacrelf.
While it's not formally part of the spec, thought I might suggest including this anyway, per EDTF.js.
inukshuk/edtf.js#12
Also, on a simpler note, can you show how to format the parsed dates, and maybe add it to the usage section?
I'm wanting to implement localized level 1 support in a project I'm working on, and am lost.
Here's the typescript prototype code I'm wanting to convert to Rust:
The text was updated successfully, but these errors were encountered: