Skip to content
Snippets Groups Projects
Commit d8fc6d61 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

Merge pull request #1997 from metabase/fix-week-year

Fix week-year formatting
parents 8ef639b4 1e4f2e6c
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,9 @@ export function formatTimeWithUnit(value, unit, options = {}) {
case "day": // January 1, 2015
return m.format("MMMM D, YYYY");
case "week": // 1st - 2015
return formatMajorMinor(m.format("wo"), m.format("YYYY"), options);
// force 'en' locale for now since our weeks currently always start on Sundays
m = m.locale("en");
return formatMajorMinor(m.format("wo"), m.format("gggg"), options);
case "month": // January 2015
return options.jsx ?
<div><span className="text-bold">{m.format("MMMM")}</span> {m.format("YYYY")}</div> :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment