Skip to content

Commit

Permalink
feat(chronos): bs-moment renamed to chronos and all locales was suffi…
Browse files Browse the repository at this point in the history
…xed with Locale (#3456)

BREAKING CHANGE:
- bs-moment renamed to chronos
- all locales was suffixed with Locale (en -> enLocale)
  • Loading branch information
valorkin authored Jan 15, 2018
1 parent bd6b119 commit dfd489b
Show file tree
Hide file tree
Showing 181 changed files with 178 additions and 196 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

### Bug Fixes

* **bs-moment:** fix postformat for empty values ([d3bb3fd](https://github.com/valor-software/ngx-bootstrap/commit/d3bb3fd))
* **chronos:** fix postformat for empty values ([d3bb3fd](https://github.com/valor-software/ngx-bootstrap/commit/d3bb3fd))
* **datepicker:** added export of he locale and fixed demo ([7616362](https://github.com/valor-software/ngx-bootstrap/commit/7616362))
* **demo:** fix scrollTop ([#2886](https://github.com/valor-software/ngx-bootstrap/issues/2886)) ([2e99010](https://github.com/valor-software/ngx-bootstrap/commit/2e99010))
* **demo:** fixed header overlapping for demo modals in directive examples ([#2974](https://github.com/valor-software/ngx-bootstrap/issues/2974)) ([9c648f6](https://github.com/valor-software/ngx-bootstrap/commit/9c648f6))
Expand Down Expand Up @@ -270,7 +270,7 @@

### Features

* **bs-moment:** add localization tests ([#2466](https://github.com/valor-software/ngx-bootstrap/issues/2466)) ([6589ee9](https://github.com/valor-software/ngx-bootstrap/commit/6589ee9))
* **chronos:** add localization tests ([#2466](https://github.com/valor-software/ngx-bootstrap/issues/2466)) ([6589ee9](https://github.com/valor-software/ngx-bootstrap/commit/6589ee9))
* **datepicker:** initial version of new datepicker ([#2426](https://github.com/valor-software/ngx-bootstrap/issues/2426)) ([b11776c](https://github.com/valor-software/ngx-bootstrap/commit/b11776c))
* **datepicker:** removed dependency on moment.js ([#2465](https://github.com/valor-software/ngx-bootstrap/issues/2465)) ([7c87162](https://github.com/valor-software/ngx-bootstrap/commit/7c87162))
* **datepicker:** use as directives ([#2446](https://github.com/valor-software/ngx-bootstrap/issues/2446)) ([d7f9a2a](https://github.com/valor-software/ngx-bootstrap/commit/d7f9a2a))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export const demoComponentContent: ContentSection[] = [
<p>Datepicker can use different locales. <br>It's possible to change a locale by calling
<code>use</code>
method of <code>BsLocaleService</code>, list of available locales is in dropdown below.</p>
<p>To use a different locale, you have to import it from <code>ngx-bootstrap/bs-moment</code> first, then
<p>To use a different locale, you have to import it from <code>ngx-bootstrap/chronos</code> first, then
define it in your <code>@NgModule</code> using function <code>defineLocale</code></p>
<p>Example: </p>
<code>import { defineLocale } from 'ngx-bootstrap/bs-moment';</code><br>
<code>import { defineLocale } from 'ngx-bootstrap/chronos';</code><br>
<code>import { de } from 'ngx-bootstrap/locale';</code><br>
<code>defineLocale('de', de);</code>
<br>
Expand Down
27 changes: 17 additions & 10 deletions demo/src/app/components/+datepicker/demo-datepicker.module.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { DatepickerModule, BsDatepickerModule } from 'ngx-bootstrap/datepicker';

import { defineLocale, LocaleData } from 'ngx-bootstrap/chronos';
import { BsDatepickerModule, DatepickerModule } from 'ngx-bootstrap/datepicker';
import {
arLocale, csLocale, deLocale, enGbLocale, esDoLocale, esLocale, esUsLocale, frLocale, heLocale, hiLocale,
huLocale, itLocale, jaLocale, koLocale, nlBeLocale, nlLocale, plLocale, ptBrLocale, ruLocale, svLocale, thLocale,
trLocale, zhCnLocale
} from 'ngx-bootstrap/locale';
import { TabsModule } from 'ngx-bootstrap/tabs';

import { DocsModule } from '../../docs';
import { DatepickerSectionComponent } from './datepicker-section.component';
import { DEMO_COMPONENTS } from './demos';
import { routes } from './demo-datepicker.routes';
import { DEMO_COMPONENTS } from './demos';

import { defineLocale, LocaleData } from 'ngx-bootstrap/bs-moment';
import {
ar, cs, de, enGb, es, esDo, esUs, fr, hi, he, hu, it, ja, ko, nl, nlBe, pl, ptBr, sv, ru, zhCn, tr, th
} from 'ngx-bootstrap/locale';

const locales = [ar, cs, de, enGb, es, esDo, esUs, fr, hi, hu, it, ja, ko, nl, nlBe, pl, ptBr, sv, ru, zhCn, tr, he, th];
const locales = [
arLocale, csLocale, deLocale, enGbLocale, esLocale, esDoLocale, esUsLocale,
frLocale, hiLocale, heLocale, huLocale, itLocale, jaLocale, koLocale, nlLocale,
nlBeLocale, plLocale, ptBrLocale, svLocale, ruLocale, zhCnLocale, trLocale, thLocale
];
locales.forEach((locale: LocaleData) => defineLocale(locale.abbr, locale));

@NgModule({
Expand All @@ -36,4 +42,5 @@ locales.forEach((locale: LocaleData) => defineLocale(locale.abbr, locale));
exports: [DatepickerSectionComponent],
entryComponents: [...DEMO_COMPONENTS]
})
export class DemoDatepickerModule {}
export class DemoDatepickerModule {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { BsDatepickerConfig, BsLocaleService } from 'ngx-bootstrap/datepicker';
import { listLocales } from 'ngx-bootstrap/bs-moment';
import { listLocales } from 'ngx-bootstrap/chronos';

@Component({
selector: 'demo-datepicker-change-locale',
Expand Down
2 changes: 1 addition & 1 deletion demo/src/assets/json/current-version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"2.0.0-beta.10"}
{"version":"2.0.0-rc.0"}
6 changes: 3 additions & 3 deletions demo/src/ng-api-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,21 @@ export const ngdoc: any = {
]
},
"LocaleOptionsFormat": {
"fileName": "src/bs-moment/locale/locale.class.ts",
"fileName": "src/chronos/locale/locale.class.ts",
"className": "LocaleOptionsFormat",
"description": "",
"methods": [],
"properties": []
},
"LocaleData": {
"fileName": "src/bs-moment/locale/locale.class.ts",
"fileName": "src/chronos/locale/locale.class.ts",
"className": "LocaleData",
"description": "",
"methods": [],
"properties": []
},
"TimeUnit": {
"fileName": "src/bs-moment/types.ts",
"fileName": "src/chronos/types.ts",
"className": "TimeUnit",
"description": "",
"methods": [],
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = function(config) {
config.set({
frameworks: ["jasmine", "karma-typescript"],
files: [
{ pattern: "src/bs-moment/**/*.+(ts|html)" }
{ pattern: "src/chronos/**/*.+(ts|html)" }
],
preprocessors: {
"**/*.ts": "karma-typescript"
Expand Down
2 changes: 1 addition & 1 deletion mocha.opts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--compilers ts:ts-node/register
src/bs-moment/**/*.spec.ts
src/chronos/**/*.spec.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"link": "ngm link -p src --here",
"lint-bdd": "tslint -c ./demo/e2e-bdd/tslint.json -p ./demo/e2e-bdd/tsconfig.json --type-check",
"lint-pretty": "prettier --config .prettierrc --write -l \"{demo/src,src}/**/*.ts\"",
"lint-src": "tslint \"src/**/*.ts\" -c tslint.json --type-check -p src/tsconfig.spec.json -e \"src/bs-moment/**\" -e \"src/**/bs-datepicker-view.html\"",
"lint-src": "tslint \"src/**/*.ts\" -c tslint.json --type-check -p src/tsconfig.spec.json -e \"src/chronos/**\" -e \"src/**/bs-datepicker-view.html\"",
"lint": "exit 0",
"disable-lint": "tslint \"**/*.ts\" -c tslint.json --fix --type-check -t prose -e \"node_modules/**\" -e \"dist/**\" -e \"temp/**\" -e \"scripts/docs/**\"",
"flow.changelog": "conventional-changelog -i CHANGELOG.md -s -p angular",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/ar.ts → src/chronos/i18n/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const months: string[] = [
'ديسمبر'
];

export const ar: LocaleData = {
export const arLocale: LocaleData = {
abbr: 'ar',
months,
monthsShort: months,
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/cs.ts → src/chronos/i18n/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function translate(num: number, withoutSuffix: boolean, key: string, isFuture: b
}
}

export const cs: LocaleData = {
export const csLocale: LocaleData = {
abbr: 'cs',
months,
monthsShort,
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/de.ts → src/chronos/i18n/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function processRelativeTime(num: number, withoutSuffix: boolean, key: string, i
return withoutSuffix ? format[key][0] : format[key][1];
}

export const de: LocaleData = {
export const deLocale: LocaleData = {
abbr: 'de',
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/en-gb.ts → src/chronos/i18n/en-gb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { LocaleData } from '../locale/locale.class';
//! locale : English (United Kingdom) [en-gb]
//! author : Chris Gedrim : https://github.com/chrisgedrim

export const enGb: LocaleData = {
export const enGbLocale: LocaleData = {
abbr: 'en-gb',
months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/es-do.ts → src/chronos/i18n/es-do.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic
let monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
let monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;

export const esDo: LocaleData = {
export const esDoLocale: LocaleData = {
abbr: 'es-do',
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/es-us.ts → src/chronos/i18n/es-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getHours, getMonth } from '../utils/date-getters';
let monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
let monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');

export const esUs: LocaleData = {
export const esUsLocale: LocaleData = {
abbr: 'es-us',
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/es.ts → src/chronos/i18n/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic
let monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
let monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;

export const es: LocaleData = {
export const esLocale: LocaleData = {
abbr: 'es',
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/fr.ts → src/chronos/i18n/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { LocaleData } from '../locale/locale.class';
//! locale : French [fr]
//! author : John Fischer : https://github.com/jfroffice

export const fr: LocaleData = {
export const frLocale: LocaleData = {
abbr: 'fr',
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/he.ts → src/chronos/i18n/he.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { LocaleData } from '../locale/locale.class';
//! author : Moshe Simantov : https://github.com/DevelopmentIL
//! author : Tal Ater : https://github.com/TalAter

export const he: LocaleData = {
export const heLocale: LocaleData = {
abbr: 'he',
months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/hi.ts → src/chronos/i18n/hi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let symbolMap: {[key: string]: string} = {
'०': '0'
};

export const hi: LocaleData = {
export const hiLocale: LocaleData = {
abbr: 'hi',
months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/hu.ts → src/chronos/i18n/hu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function week(date: Date, isFuture: boolean) {
return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[getDayOfWeek(date)] + '] LT[-kor]';
}

export const hu: LocaleData = {
export const huLocale: LocaleData = {
abbr: 'hu',
months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/it.ts → src/chronos/i18n/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getDayOfWeek } from '../units/day-of-week';
//! author : Lorenzo : https://github.com/aliem
//! author: Mattia Larentis: https://github.com/nostalgiaz

export const it: LocaleData = {
export const itLocale: LocaleData = {
abbr: 'it',
months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/ja.ts → src/chronos/i18n/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { LocaleData } from '../locale/locale.class';
//! locale : Japanese [ja]
//! author : LI Long : https://github.com/baryon

export const ja: LocaleData = {
export const jaLocale: LocaleData = {
abbr: 'ja',
months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/ko.ts → src/chronos/i18n/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { LocaleData } from '../locale/locale.class';
//! author : Kyungwook, Park : https://github.com/kyungw00k
//! author : Jeeeyul Lee <jeeeyul@gmail.com>

export const ko: LocaleData = {
export const koLocale: LocaleData = {
abbr: 'ko',
months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/nl-be.ts → src/chronos/i18n/nl-be.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.s
let monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
let monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;

export const nlBe: LocaleData = {
export const nlBeLocale: LocaleData = {
abbr: 'nl-be',
months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/nl.ts → src/chronos/i18n/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov.
let monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
let monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;

export const nl: LocaleData = {
export const nlLocale: LocaleData = {
abbr: 'nl',
months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
monthsShort (date: Date, format: string, isUTC?: boolean): string | string[] {
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/pl.ts → src/chronos/i18n/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function translate(num: number, withoutSuffix: boolean, key: string): string {
}
}

export const pl: LocaleData = {
export const plLocale: LocaleData = {
abbr: 'pl',
months(date: Date, format: string, isUTC?: boolean): string | string[] {
if (!date) {
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/pt-br.ts → src/chronos/i18n/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getDayOfWeek } from '../units/day-of-week';
//! locale : Portuguese (Brazil) [pt-br]
//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira

export const ptBr: LocaleData = {
export const ptBrLocale: LocaleData = {
abbr: 'pt-br',
months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/ru.ts → src/chronos/i18n/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/
// http://new.gramota.ru/spravka/rules/139-prop : § 103
// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
export const ru: LocaleData = {
export const ruLocale: LocaleData = {
abbr: 'ru',
months: {
format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/sv.ts → src/chronos/i18n/sv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { LocaleData } from '../locale/locale.class';
//! locale : Swedish [sv]
//! author : Jens Alm : https://github.com/ulmus

export const sv: LocaleData = {
export const svLocale: LocaleData = {
abbr: 'sv',
months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/th.ts → src/chronos/i18n/th.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { LocaleData } from '../locale/locale.class';

export const th: LocaleData = {
export const thLocale: LocaleData = {
abbr: 'th',
months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/tr.ts → src/chronos/i18n/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let suffixes: { [key: string]: string } = {
90: '\'ıncı'
};

export const tr: LocaleData = {
export const trLocale: LocaleData = {
abbr: 'tr',
months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/uk.ts → src/chronos/i18n/uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function processHoursFunction(str: string) {
};
}

export const uk: LocaleData = {
export const ukLocale: LocaleData = {
abbr: 'uk',
months: {
format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
Expand Down
2 changes: 1 addition & 1 deletion src/bs-moment/i18n/zh-cn.ts → src/chronos/i18n/zh-cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { LocaleData } from '../locale/locale.class';
//! author : suupic : https://github.com/suupic
//! author : Zeno Zeng : https://github.com/zenozeng

export const zhCn: LocaleData = {
export const zhCnLocale: LocaleData = {
abbr: 'zh-cn',
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { assert } from 'chai';
import { moment } from '../chain';
import { ar } from '../../i18n/ar';
import { arLocale } from '../../i18n/ar';

// localeModule('ar');

Expand All @@ -24,7 +24,7 @@ var months = [
];
describe('locale: ar', () => {
beforeAll(() => {
moment.locale('ar', ar);
moment.locale('ar', arLocale);
});

afterAll(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import { assert } from 'chai';
import { moment } from '../chain';
import { cs } from '../../i18n/cs';
import { csLocale } from '../../i18n/cs';
// localeModule('cs');

describe('locale: cs', () => {
beforeAll(() => {
moment.locale('cs', cs);
moment.locale('cs', csLocale);
});

afterAll(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import { assert } from 'chai';
import { moment } from '../chain';
import { de } from '../../i18n/de';
import { deLocale } from '../../i18n/de';

// localeModule('de');
describe('locale: de', () => {
beforeAll(() => {
moment.locale('de', de);
moment.locale('de', deLocale);
});

afterAll(() => {
Expand Down
Loading

1 comment on commit dfd489b

@MatissJanis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This braking change made me waste quite a lot of time. Please document this somewhere.

Please sign in to comment.