Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Date-time formatting todos #120

Open
4 tasks
bdarcus opened this issue May 19, 2023 · 0 comments
Open
4 tasks

Date-time formatting todos #120

bdarcus opened this issue May 19, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@bdarcus
Copy link
Owner

bdarcus commented May 19, 2023

  1. hook up output locale (see Rather than require a locale file as input, allow a locale? #86)
  2. add "date-time" format(s)
  3. figure out and implement advanced EDTF dates (ranges and intervals, approximate, seasons, etc)
  4. Integrate Ajv #72

Not sure what we need on 2 and 3.

Date-time details

What formats do we need?

Here's what's possible with Intl.DateTimeFormat (playground):

console.log(new Intl.DateTimeFormat('de', {
    dateStyle: 'long',
    timeStyle: 'long',
    timeZone: 'Europe/Berlin'
}).format(date));
// Expected output: "20. Dezember 2020 um 04:23:16 MEZ"

@denismaier - if you have time and interest sometime soon, this may be something you have knowledge of?

Basically, I just need two or three starting date-time formats.

Seems the primary use case is accessing online resources.

If timezones are in some styles (I assume not all) included, how do they work; what zone?

Edit: quick googling says no timezones, so won't worry about for now.

Need to check if time-zone before formatting it

The edtf parser sets a time even if not in the input data.

So will need to account for that.

@bdarcus bdarcus added the enhancement New feature or request label May 19, 2023
@bdarcus bdarcus changed the title Date formatting todos Date-time formatting todos May 19, 2023
@bdarcus bdarcus added this to the v0.2 milestone May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant