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

D2M #1199

Merged
merged 2 commits into from
Nov 10, 2020
Merged

D2M #1199

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/locale/lv.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ const locale = {
LL: 'YYYY. [gada] D. MMMM',
LLL: 'YYYY. [gada] D. MMMM, HH:mm',
LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm'
},
relativeTime: {
future: 'pēc %s',
past: 'pirms %s',
s: 'dažām sekundēm',
m: 'minūtes',
mm: '%d minūtēm',
h: 'stundas',
hh: '%d stundām',
d: 'dienas',
dd: '%d dienām',
M: 'mēneša',
MM: '%d mēnešiem',
y: 'gada',
yy: '%d gadiem'
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/plugin/customParseFormat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function correctHours(time) {
}

function makeParser(format) {
format = u(format, locale.formats)
format = u(format, locale && locale.formats)
const array = format.match(formattingTokens)
const { length } = array
for (let i = 0; i < length; i += 1) {
Expand Down Expand Up @@ -224,6 +224,8 @@ export default (o, C, d) => {
if (isStrict && date !== this.format(format)) {
this.$d = new Date('')
}
// reset global locale to make parallel unit test
locale = undefined
} else if (format instanceof Array) {
const len = format.length
for (let i = 1; i <= len; i += 1) {
Expand Down