🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

@chayns-components/date

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chayns-components/date - npm Package Compare versions

Comparing version

to
5.0.0-beta.986

@@ -59,4 +59,3 @@ "use strict";

const hourWord = getTimeString({
language,
date
language
});

@@ -111,19 +110,19 @@ formattedTime += shouldShowTime ? ` ${hourWord}` : '';

const getTimeString = ({
language,
date
language
}) => {
const map = {
'nl': 'uur',
'fr': 'heures',
'de': 'Uhr',
'es': 'horas',
'it': 'ore',
'pt': 'horas',
'pl': 'godzina',
'tr': 'saat',
'uk': 'година'
nl: 'uur',
fr: 'heures',
de: 'Uhr',
es: 'horas',
it: 'ore',
pt: 'horas',
pl: 'godzina',
tr: 'saat',
uk: 'година',
en: ''
};
return map[language ?? ''] || ((0, _date.isMorning)(date) ? 'AM' : 'PM');
return map[language ?? ''] ?? '';
};
exports.getTimeString = getTimeString;
//# sourceMappingURL=dateInfo.js.map
import { getLanguage, Language } from 'chayns-api';
import { isCurrentYear, isMorning, isToday, isTomorrow, isYesterday } from "./date";
import { isCurrentYear, isToday, isTomorrow, isYesterday } from './date';
export const getDateInfo = _ref => {

@@ -54,4 +54,3 @@ let {

const hourWord = getTimeString({
language,
date
language
});

@@ -106,18 +105,18 @@ formattedTime += shouldShowTime ? ` ${hourWord}` : '';

let {
language,
date
language
} = _ref3;
const map = {
'nl': 'uur',
'fr': 'heures',
'de': 'Uhr',
'es': 'horas',
'it': 'ore',
'pt': 'horas',
'pl': 'godzina',
'tr': 'saat',
'uk': 'година'
nl: 'uur',
fr: 'heures',
de: 'Uhr',
es: 'horas',
it: 'ore',
pt: 'horas',
pl: 'godzina',
tr: 'saat',
uk: 'година',
en: ''
};
return map[language ?? ''] || (isMorning(date) ? 'AM' : 'PM');
return map[language ?? ''] ?? '';
};
//# sourceMappingURL=dateInfo.js.map

@@ -12,5 +12,4 @@ import { Language } from 'chayns-api';

language?: Language;
date: Date;
}
export declare const getTimeString: ({ language, date }: GetTimeStringProps) => string;
export declare const getTimeString: ({ language }: GetTimeStringProps) => string;
export {};
{
"name": "@chayns-components/date",
"version": "5.0.0-beta.985",
"version": "5.0.0-beta.986",
"description": "A set of beautiful React components for developing your own applications with chayns.",

@@ -85,3 +85,3 @@ "sideEffects": false,

},
"gitHead": "622cd1c98cb7e80e62db7da22725dd4dbbbb70ce"
"gitHead": "226a4dab71986e72e5729b0f5636478dab9b9aa0"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet