Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add New Zealand English (en-NZ) locale (#1835)
- Loading branch information
Showing
8 changed files
with
450 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index.js' | ||
|
||
var dateFormats = { | ||
full: 'EEEE, d MMMM yyyy', | ||
long: 'd MMMM yyyy', | ||
medium: 'd MMM yyyy', | ||
short: 'dd/MM/yyyy' | ||
} | ||
|
||
var timeFormats = { | ||
full: 'h:mm:ss a zzzz', | ||
long: 'h:mm:ss a z', | ||
medium: 'h:mm:ss a', | ||
short: 'h:mm a' | ||
} | ||
|
||
var dateTimeFormats = { | ||
full: "{{date}} 'at' {{time}}", | ||
long: "{{date}} 'at' {{time}}", | ||
medium: '{{date}}, {{time}}', | ||
short: '{{date}}, {{time}}' | ||
} | ||
|
||
var formatLong = { | ||
date: buildFormatLongFn({ | ||
formats: dateFormats, | ||
defaultWidth: 'full' | ||
}), | ||
|
||
time: buildFormatLongFn({ | ||
formats: timeFormats, | ||
defaultWidth: 'full' | ||
}), | ||
|
||
dateTime: buildFormatLongFn({ | ||
formats: dateTimeFormats, | ||
defaultWidth: 'full' | ||
}) | ||
} | ||
|
||
export default formatLong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. | ||
|
||
import { enNZ } from 'date-fns/locale' | ||
export default enNZ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import formatDistance from '../en-US/_lib/formatDistance/index.js' | ||
import formatLong from './_lib/formatLong/index.js' | ||
import formatRelative from '../en-US/_lib/formatRelative/index.js' | ||
import localize from '../en-US/_lib/localize/index.js' | ||
import match from '../en-US/_lib/match/index.js' | ||
|
||
/** | ||
* @type {Locale} | ||
* @category Locales | ||
* @summary English locale (New Zealand). | ||
* @language English | ||
* @iso-639-2 eng | ||
* @author Murray Lucas [@muntact]{@link https://github.com/muntact} | ||
*/ | ||
var locale = { | ||
code: 'en-NZ', | ||
formatDistance: formatDistance, | ||
formatLong: formatLong, | ||
formatRelative: formatRelative, | ||
localize: localize, | ||
match: match, | ||
options: { | ||
weekStartsOn: 1 /* Monday */, | ||
firstWeekContainsDate: 4 | ||
} | ||
} | ||
|
||
export default locale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// @flow | ||
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. | ||
|
||
export type Locale = { | ||
code?: string, | ||
formatDistance?: (...args: Array<any>) => any, | ||
formatRelative?: (...args: Array<any>) => any, | ||
localize?: { | ||
ordinalNumber: (...args: Array<any>) => any, | ||
era: (...args: Array<any>) => any, | ||
quarter: (...args: Array<any>) => any, | ||
month: (...args: Array<any>) => any, | ||
day: (...args: Array<any>) => any, | ||
dayPeriod: (...args: Array<any>) => any | ||
}, | ||
formatLong?: { | ||
date: (...args: Array<any>) => any, | ||
time: (...args: Array<any>) => any, | ||
dateTime: (...args: Array<any>) => any | ||
}, | ||
match?: { | ||
ordinalNumber: (...args: Array<any>) => any, | ||
era: (...args: Array<any>) => any, | ||
quarter: (...args: Array<any>) => any, | ||
month: (...args: Array<any>) => any, | ||
day: (...args: Array<any>) => any, | ||
dayPeriod: (...args: Array<any>) => any | ||
}, | ||
options?: { | ||
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6, | ||
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | ||
} | ||
} | ||
|
||
declare module.exports: Locale |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters