bigeasy / timezone

Full-blown timezone aware date math and formatting for JavaScript in 2.7k.
http://bigeasy.github.io/timezone
MIT License
257 stars 27 forks source link

feat: Add meridiems based on default AM/PM output #332

Closed JackHowa closed 3 years ago

JackHowa commented 3 years ago

Update: tests pass as expected locally and in the jenkins. Thank you @bigeasy for fixing ci issue.

Test steps locally:

using node@12

  1. git clone https://github.com/bigeasy/timezone.git
  2. git submodule update --init --recursive
  3. make
  4. npm i
  5. npm t

Closes https://github.com/bigeasy/timezone/issues/331

If a user is expecting to not get a meridiem because the locale previously didn't support it, then they would not get it if they elected for that format

Updated test steps and docs in #333


the tests did not seem to be passing for me locally so I wasn't sure if the failing was as expected

from master:


> ✘ t/format/abbrev.t.js: Bail Out!
# Error: Cannot find module 'timezone/America/Anchorage'
#     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
#     at Function.Module._load (internal/modules/cjs/loader.js:508:25)
#     at Module.require (internal/modules/cjs/loader.js:637:17)
#     at require (internal/modules/cjs/helpers.js:22:18)
#     at prove (/Users/howardj/sites/learning/timezone/t/format/abbrev.t.js:5:13)
#     at /Users/howardj/sites/learning/timezone/node_modules/proof/scaffold.js:31:19
#     at module.exports (/Users/howardj/sites/learning/timezone/node_modules/proof/index.js:13:9)
#     at Object.<anonymous> (/Users/howardj/sites/learning/timezone/t/format/abbrev.t.js:1:79)
#     at Module._compile (internal/modules/cjs/loader.js:701:30)
#     at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
> ✘ t/format/abbrev.t.js: expected 1 test but got 0: exited with code 1

>--

...
JackHowa commented 3 years ago

Thank you @bigeasy for fixing the test runner issue, should've seen it. Updated the tests as well to include am/pm. Looking forward to the update 🚀

JackHowa commented 3 years ago

@bigeasy let me know if I should close this (not sure status). seems like the build system is now working as expected and the meridiems are displaying for these though!

JackHowa commented 3 years ago

@bigeasy let me know if you have time to look at this. seems to be working in that it's adding meridiems to the dates