sourcecred/config
William Chargin 7604b11617
env: fix commit date formatting (#954)
Summary:
Fun facts:

  - `new Date().getDay()` does not return the day of the month. It
    returns the day of the _week_ as an integer `0 ≤ n ≤ 6`.
  - `new Date().getDate()` returns the day of the month from 1 to 31.
  - `new Date().getMonth()` really does return the month, but _this_ one
    is zero-based!

All this to say, my implementation in #901 was a bit flawed.
Why didn’t I notice at the time? I wrote and tested the change on
2018-10-01, which was a Monday, so both `getDay()` and `getDate()` were
in fact `1`. As for me failing to notice that `getMonth()` was off by
one—well, sometimes I’m very dumb.

Test Plan:

```shell
$ NODE_ENV=development node -e '
>     require("./config/env");
>     console.log(process.env.SOURCECRED_GIT_STATE);
> '
{"commitHash":"f9bb75ef71c5","commitTimestamp":"20181030-1518","dirty":true}
$ date -I
2018-10-30
```

wchargin-branch: env-fix-date-formatting
2018-10-30 17:24:39 -07:00
..
jest flow: add typing to Jest transform modules (#790) 2018-09-06 13:30:33 -07:00
RemoveBuildDirectoryPlugin.js webpack: empty build dir instead of removing it (#768) 2018-09-04 21:44:09 -07:00
babel.js babel: transform ES6 modules to CommonJS (#766) 2018-09-04 21:47:36 -07:00
env.js env: fix commit date formatting (#954) 2018-10-30 17:24:39 -07:00
paths.js fetchGithubRepo: use Mirror pipeline (#937) 2018-10-28 12:03:06 -07:00
polyfills.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
test.js ci: remove Travis (#914) 2018-10-04 12:31:14 -07:00
webpack.config.backend.js github: add GraphQL schema and Flow types (#928) 2018-10-19 09:04:54 -07:00
webpack.config.web.js webpack: remove superfluous linting step (#775) 2018-09-05 11:25:59 -07:00