X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Flib%2Fmoment%2Flocale%2Fhe.js;h=6e55a7a243971932dedf80175c9968fb15515775;hp=05b0209909684d62b93e5a8a27093a132fdd9c16;hb=49748181dd56ec97e7ba7c13e684a16abceb3cc0;hpb=adae996840b9e782f6e14b21c433a83e37c3a74e diff --git a/resources/lib/moment/locale/he.js b/resources/lib/moment/locale/he.js index 05b0209909..6e55a7a243 100644 --- a/resources/lib/moment/locale/he.js +++ b/resources/lib/moment/locale/he.js @@ -1,21 +1,18 @@ -// moment.js locale configuration -// locale : Hebrew (he) -// author : Tomer Cohen : https://github.com/tomer -// author : Moshe Simantov : https://github.com/DevelopmentIL -// author : Tal Ater : https://github.com/TalAter +//! moment.js locale configuration +//! locale : Hebrew [he] +//! author : Tomer Cohen : https://github.com/tomer +//! author : Moshe Simantov : https://github.com/DevelopmentIL +//! author : Tal Ater : https://github.com/TalAter -(function (factory) { - // Comment out broken wrapper, see T145382 - /*if (typeof define === 'function' && define.amd) { - define(['moment'], factory); // AMD - } else if (typeof exports === 'object') { - module.exports = factory(require('../moment')); // Node - } else { - factory((typeof global !== 'undefined' ? global : this).moment); // node or other global - }*/ - factory(this.moment); -}(function (moment) { - return moment.defineLocale('he', { +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, function (moment) { 'use strict'; + + + var he = moment.defineLocale('he', { months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), @@ -23,15 +20,15 @@ weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), longDateFormat : { LT : 'HH:mm', - LTS : 'LT:ss', + LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D [ב]MMMM YYYY', - LLL : 'D [ב]MMMM YYYY LT', - LLLL : 'dddd, D [ב]MMMM YYYY LT', + LLL : 'D [ב]MMMM YYYY HH:mm', + LLLL : 'dddd, D [ב]MMMM YYYY HH:mm', l : 'D/M/YYYY', ll : 'D MMM YYYY', - lll : 'D MMM YYYY LT', - llll : 'ddd, D MMM YYYY LT' + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' }, calendar : { sameDay : '[היום ב־]LT', @@ -72,9 +69,31 @@ yy : function (number) { if (number === 2) { return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; } return number + ' שנים'; } + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM : function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } } }); -})); + + return he; + +})); \ No newline at end of file