date-fns/locale#fr JavaScript Examples

The following examples show how to use date-fns/locale#fr. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: utils.js    From monsuivipsy with Apache License 2.0 7 votes vote down vote up
generateTime = (firstDay, today) => {
  return `
    <table
      width="100%"
      style="
        width: 100%;
        max-width: 100%:
        border-collapse: collapse;
        table-layout: fixed;
      "
    >
      <tbody>
        <tr>
          <td>${format(firstDay, "EEEE d MMMM", { locale: fr })}</td>
          <td align="right" style="text-align: right;">
              ${format(today, "EEEE d MMMM", { locale: fr })}
          </td>
        </tr>
      </tbody>
    </table>
  `;
}
Example #2
Source File: helpers.js    From monsuivipsy with Apache License 2.0 6 votes vote down vote up
formatRelativeDate = (date) => {
  const isoDate = parseISO(date);
  if (isToday(isoDate)) {
    return "aujourd'hui";
  } else if (isYesterday(isoDate)) {
    return "hier";
  } else {
    return format(isoDate, "EEEE d MMMM", { locale: fr });
  }
}
Example #3
Source File: helpers.js    From monsuivipsy with Apache License 2.0 6 votes vote down vote up
formatDateThread = (date) => {
  const isoDate = parseISO(date);
  if (isToday(isoDate)) {
    return "Aujourd'hui";
  } else if (isYesterday(isoDate)) {
    return "Hier";
  } else {
    const formattedDate = format(isoDate, "EEEE d MMMM", { locale: fr });
    return firstLetterUppercase(formattedDate);
  }
}
Example #4
Source File: index.js    From covid19japan with MIT License 6 votes vote down vote up
LOCALES = {
  en: enUS,
  ja: ja,
  es: es,
  de: de,
  pt: ptBR,
  fr: fr,
  id: id,
  ph: fil,
  pl: pl,
  it: it,
  fi: fi,
  cs: cs,
  bn: bn,
  hi: hi,
  uk: uk,
  zh: zhTW,
  ar: ar,
  ru: ru,
  th: th,
  fa: faIR,
  tr: tr,
  np: np,
}
Example #5
Source File: helpers.js    From monsuivipsy with Apache License 2.0 5 votes vote down vote up
formatDate = (d) => {
  if (!d) return "-";
  const isoDate = parseISO(d);

  return format(isoDate, "EEEE d MMMM", { locale: fr });
}
Example #6
Source File: helpers.js    From monsuivipsy with Apache License 2.0 5 votes vote down vote up
getFirst3LetterWeekDay = (date) => {
  const isoDate = parseISO(date);
  const d = format(isoDate, "EEEE d MMMM", { locale: fr });
  return d.substring(0, 3);
}
Example #7
Source File: dfnshelper.js    From jellyfin-web-jmp with GNU General Public License v2.0 5 votes vote down vote up
dateLocales = (locale) => ({
    'af': af,
    'ar': arDZ,
    'be-by': be,
    'bg-bg': bg,
    'bn': bn,
    'ca': ca,
    'cs': cs,
    'cy': cy,
    'da': da,
    'de': de,
    'el': el,
    'en-gb': enGB,
    'en-us': enUS,
    'eo': eo,
    'es': es,
    'es-ar': es,
    'es-do': es,
    'es-mx': es,
    'et': et,
    'fa': faIR,
    'fi': fi,
    'fr': fr,
    'fr-ca': frCA,
    'gl': gl,
    'gsw': de,
    'he': he,
    'hi-in': hi,
    'hr': hr,
    'hu': hu,
    'id': id,
    'is': is,
    'it': it,
    'ja': ja,
    'kk': kk,
    'ko': ko,
    'lt-lt': lt,
    'lv': lv,
    'ms': ms,
    'nb': nb,
    'nl': nl,
    'nn': nn,
    'pl': pl,
    'pt': pt,
    'pt-br': ptBR,
    'pt-pt': pt,
    'ro': ro,
    'ru': ru,
    'sk': sk,
    'sl-si': sl,
    'sv': sv,
    'ta': ta,
    'th': th,
    'tr': tr,
    'uk': uk,
    'vi': vi,
    'zh-cn': zhCN,
    'zh-hk': zhCN,
    'zh-tw': zhTW
})[locale]
Example #8
Source File: lang.js    From umami with MIT License 5 votes vote down vote up
languages = {
  'ar-SA': { label: 'العربية', dateLocale: arSA, dir: 'rtl' },
  'zh-CN': { label: '中文', dateLocale: zhCN },
  'zh-TW': { label: '中文(繁體)', dateLocale: zhTW },
  'ca-ES': { label: 'Català', dateLocale: ca },
  'cs-CZ': { label: 'Čeština', dateLocale: cs },
  'da-DK': { label: 'Dansk', dateLocale: da },
  'de-DE': { label: 'Deutsch', dateLocale: de },
  'en-US': { label: 'English (US)', dateLocale: enUS },
  'en-GB': { label: 'English (UK)', dateLocale: enGB },
  'es-MX': { label: 'Español', dateLocale: es },
  'fa-IR': { label: 'فارسی', dateLocale: faIR, dir: 'rtl' },
  'fo-FO': { label: 'Føroyskt' },
  'fr-FR': { label: 'Français', dateLocale: fr },
  'ga-ES': { label: 'Galacian (Spain)', dateLocale: es },
  'el-GR': { label: 'Ελληνικά', dateLocale: el },
  'he-IL': { label: 'עברית', dateLocale: he },
  'hi-IN': { label: 'हिन्दी', dateLocale: hi },
  'hu-HU': { label: 'Hungarian', dateLocale: hu },
  'it-IT': { label: 'Italiano', dateLocale: it },
  'id-ID': { label: 'Bahasa Indonesia', dateLocale: id },
  'ja-JP': { label: '日本語', dateLocale: ja },
  'ko-KR': { label: '한국어', dateLocale: ko },
  'lt-LT': { label: 'Lietuvių', dateLocale: lt },
  'ms-MY': { label: 'Malay', dateLocale: ms },
  'mn-MN': { label: 'Монгол', dateLocale: mn },
  'nl-NL': { label: 'Nederlands', dateLocale: nl },
  'nb-NO': { label: 'Norsk Bokmål', dateLocale: nb },
  'pl-PL': { label: 'Polski', dateLocale: pl },
  'pt-PT': { label: 'Português', dateLocale: pt },
  'pt-BR': { label: 'Português do Brasil', dateLocale: ptBR },
  'ru-RU': { label: 'Русский', dateLocale: ru },
  'ro-RO': { label: 'Română', dateLocale: ro },
  'sk-SK': { label: 'Slovenčina', dateLocale: sk },
  'sl-SI': { label: 'Slovenščina', dateLocale: sl },
  'fi-FI': { label: 'Suomi', dateLocale: fi },
  'sv-SE': { label: 'Svenska', dateLocale: sv },
  'ta-IN': { label: 'தமிழ்', dateLocale: ta },
  'tr-TR': { label: 'Türkçe', dateLocale: tr },
  'uk-UA': { label: 'українська', dateLocale: uk },
  'ur-PK': { label: 'Urdu (Pakistan)', dateLocale: uk, dir: 'rtl' },
  'vi-VN': { label: 'Tiếng Việt', dateLocale: vi },
}