mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 07:11:15 +03:00
Forgot to commit this
This commit is contained in:
parent
fd5e574e70
commit
4cc6a6a12c
1 changed files with 2 additions and 2 deletions
|
@ -8,11 +8,11 @@ const defaultLocale = mem(
|
||||||
);
|
);
|
||||||
|
|
||||||
const _DateTimeFormat = (opts) => {
|
const _DateTimeFormat = (opts) => {
|
||||||
const { locale, dateYear, hideTime, formatOpts } = opts || {};
|
const { locale, dateYear, hideTime, formatOpts, forceOpts } = opts || {};
|
||||||
const regionlessLocale = locale.replace(/-[a-z]+$/i, '');
|
const regionlessLocale = locale.replace(/-[a-z]+$/i, '');
|
||||||
const loc = localeMatch([regionlessLocale], [defaultLocale], locale);
|
const loc = localeMatch([regionlessLocale], [defaultLocale], locale);
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
const options = {
|
const options = forceOpts || {
|
||||||
// Show year if not current year
|
// Show year if not current year
|
||||||
year: dateYear === currentYear ? undefined : 'numeric',
|
year: dateYear === currentYear ? undefined : 'numeric',
|
||||||
month: 'short',
|
month: 'short',
|
||||||
|
|
Loading…
Add table
Reference in a new issue