Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature en-NZ #1835

Merged
merged 2 commits into from Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/locale/en-NZ/_lib/formatLong/index.js
@@ -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
4 changes: 4 additions & 0 deletions src/locale/en-NZ/index.d.ts
@@ -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
28 changes: 28 additions & 0 deletions src/locale/en-NZ/index.js
@@ -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
35 changes: 35 additions & 0 deletions src/locale/en-NZ/index.js.flow
@@ -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
304 changes: 304 additions & 0 deletions src/locale/en-NZ/snapshot.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/locale/index.js
Expand Up @@ -18,6 +18,7 @@ export { default as enAU } from './en-AU/index.js'
export { default as enCA } from './en-CA/index.js'
export { default as enGB } from './en-GB/index.js'
export { default as enIN } from './en-IN/index.js'
export { default as enNZ } from './en-NZ/index.js'
export { default as enUS } from './en-US/index.js'
export { default as eo } from './eo/index.js'
export { default as es } from './es/index.js'
Expand Down
1 change: 1 addition & 0 deletions src/locale/index.js.flow
Expand Up @@ -52,6 +52,7 @@ declare module.exports: {
enCA: Locale,
enGB: Locale,
enIN: Locale,
enNZ: Locale,
enUS: Locale,
eo: Locale,
es: Locale,
Expand Down
36 changes: 36 additions & 0 deletions typings.d.ts
Expand Up @@ -15739,6 +15739,9 @@ declare module 'date-fns/locale' {
const enIN: Locale
namespace enIN {}

const enNZ: Locale
namespace enNZ {}

const enUS: Locale
namespace enUS {}

Expand Down Expand Up @@ -16000,6 +16003,11 @@ declare module 'date-fns/locale/en-IN' {
export default enIN
}

declare module 'date-fns/locale/en-NZ' {
import { enNZ } from 'date-fns/locale'
export default enNZ
}

declare module 'date-fns/locale/en-US' {
import { enUS } from 'date-fns/locale'
export default enUS
Expand Down Expand Up @@ -16370,6 +16378,11 @@ declare module 'date-fns/locale/en-IN/index' {
export default enIN
}

declare module 'date-fns/locale/en-NZ/index' {
import { enNZ } from 'date-fns/locale'
export default enNZ
}

declare module 'date-fns/locale/en-US/index' {
import { enUS } from 'date-fns/locale'
export default enUS
Expand Down Expand Up @@ -16740,6 +16753,11 @@ declare module 'date-fns/locale/en-IN/index.js' {
export default enIN
}

declare module 'date-fns/locale/en-NZ/index.js' {
import { enNZ } from 'date-fns/locale'
export default enNZ
}

declare module 'date-fns/locale/en-US/index.js' {
import { enUS } from 'date-fns/locale'
export default enUS
Expand Down Expand Up @@ -17075,6 +17093,9 @@ declare module 'date-fns/esm/locale' {
const enIN: Locale
namespace enIN {}

const enNZ: Locale
namespace enNZ {}

const enUS: Locale
namespace enUS {}

Expand Down Expand Up @@ -17336,6 +17357,11 @@ declare module 'date-fns/esm/locale/en-IN' {
export default enIN
}

declare module 'date-fns/esm/locale/en-NZ' {
import { enNZ } from 'date-fns/esm/locale'
export default enNZ
}

declare module 'date-fns/esm/locale/en-US' {
import { enUS } from 'date-fns/esm/locale'
export default enUS
Expand Down Expand Up @@ -17706,6 +17732,11 @@ declare module 'date-fns/esm/locale/en-IN/index' {
export default enIN
}

declare module 'date-fns/esm/locale/en-NZ/index' {
import { enNZ } from 'date-fns/esm/locale'
export default enNZ
}

declare module 'date-fns/esm/locale/en-US/index' {
import { enUS } from 'date-fns/esm/locale'
export default enUS
Expand Down Expand Up @@ -18076,6 +18107,11 @@ declare module 'date-fns/esm/locale/en-IN/index.js' {
export default enIN
}

declare module 'date-fns/esm/locale/en-NZ/index.js' {
import { enNZ } from 'date-fns/esm/locale'
export default enNZ
}

declare module 'date-fns/esm/locale/en-US/index.js' {
import { enUS } from 'date-fns/esm/locale'
export default enUS
Expand Down