1

I've been trying to do some time formatting within a unit test, and noticed an inconsistency between Jasmine and when using Wallaby. I'm trying to figure out why this is. If I take the following example:

var options = { year: "numeric", month: "short", day: "numeric" };
console.log(new Date("01/01/2013").toLocaleDateString("en-gb", options));

Running this in Chrome using Jasmine I get the following output 1 Jan 2013.
If I log this through Wallaby however I get Tuesday, January 01, 2013.

I've read that I can configure things such as the environment and set flags for PhantomJS that's used underneath - but I'm not sure what to set. I know that I can modify the locale using the TZ variable - but I'm already specifying the locale as en-gb in my example.

Is it possible to configure the formatting? Am I looking at the wrong thing to configure this formatting?

Ian
  • 33,605
  • 26
  • 118
  • 198
  • All PhantomJS versions seem to support only long months and PhantomJS 1.x seems to always include the weekday (not PhantomJS 2.0.0). – Artjom B. Nov 25 '15 at 20:01

0 Answers0