deno_std
deno_std copied to clipboard
refactor(datetime): Move behavior of DateTimeFormatter to standalone functions
Improves test coverage.
The functions are almost entirely unchanged, with the exception of some renaming.
These functions should not be used outside tests, and DateTimeFormatter itself is an internal class.
TODO (I will look into these):
- Refactor errors to consistently provide useful feedback
- Add support for more format strings: Goal is parity with Intl.DateTimeFormat
- Add support for time zones (this will improve coverage in this file to almost 100%)