diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c62a2969..3cc46565f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) @@ -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)) diff --git a/demo/src/app/components/+datepicker/datepicker-section.list.ts b/demo/src/app/components/+datepicker/datepicker-section.list.ts index e7e393e99a..27b7982e6d 100644 --- a/demo/src/app/components/+datepicker/datepicker-section.list.ts +++ b/demo/src/app/components/+datepicker/datepicker-section.list.ts @@ -73,10 +73,10 @@ export const demoComponentContent: ContentSection[] = [

Datepicker can use different locales.
It's possible to change a locale by calling use method of BsLocaleService, list of available locales is in dropdown below.

-

To use a different locale, you have to import it from ngx-bootstrap/bs-moment first, then +

To use a different locale, you have to import it from ngx-bootstrap/chronos first, then define it in your @NgModule using function defineLocale

Example:

- import { defineLocale } from 'ngx-bootstrap/bs-moment';
+ import { defineLocale } from 'ngx-bootstrap/chronos';
import { de } from 'ngx-bootstrap/locale';
defineLocale('de', de);
diff --git a/demo/src/app/components/+datepicker/demo-datepicker.module.ts b/demo/src/app/components/+datepicker/demo-datepicker.module.ts index fd63fc8331..0aeff2e3a7 100644 --- a/demo/src/app/components/+datepicker/demo-datepicker.module.ts +++ b/demo/src/app/components/+datepicker/demo-datepicker.module.ts @@ -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({ @@ -36,4 +42,5 @@ locales.forEach((locale: LocaleData) => defineLocale(locale.abbr, locale)); exports: [DatepickerSectionComponent], entryComponents: [...DEMO_COMPONENTS] }) -export class DemoDatepickerModule {} +export class DemoDatepickerModule { +} diff --git a/demo/src/app/components/+datepicker/demos/change-locale/change-locale.ts b/demo/src/app/components/+datepicker/demos/change-locale/change-locale.ts index a82c7caf54..30a1b48ee9 100644 --- a/demo/src/app/components/+datepicker/demos/change-locale/change-locale.ts +++ b/demo/src/app/components/+datepicker/demos/change-locale/change-locale.ts @@ -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', diff --git a/demo/src/assets/json/current-version.json b/demo/src/assets/json/current-version.json index a515aecdf5..92ac847149 100644 --- a/demo/src/assets/json/current-version.json +++ b/demo/src/assets/json/current-version.json @@ -1 +1 @@ -{"version":"2.0.0-beta.10"} +{"version":"2.0.0-rc.0"} diff --git a/demo/src/ng-api-doc.ts b/demo/src/ng-api-doc.ts index d10014f7f9..81e3e57c5d 100644 --- a/demo/src/ng-api-doc.ts +++ b/demo/src/ng-api-doc.ts @@ -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": [], diff --git a/karma.conf.js b/karma.conf.js index 90eba1ff34..0e890d4313 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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" diff --git a/mocha.opts b/mocha.opts index e9ebad2314..4670d7ae25 100644 --- a/mocha.opts +++ b/mocha.opts @@ -1,2 +1,2 @@ --compilers ts:ts-node/register -src/bs-moment/**/*.spec.ts +src/chronos/**/*.spec.ts diff --git a/package.json b/package.json index 54c43c7931..b062049498 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/bs-moment/LICENSE b/src/chronos/LICENSE similarity index 100% rename from src/bs-moment/LICENSE rename to src/chronos/LICENSE diff --git a/src/bs-moment/create/check-overflow.ts b/src/chronos/create/check-overflow.ts similarity index 100% rename from src/bs-moment/create/check-overflow.ts rename to src/chronos/create/check-overflow.ts diff --git a/src/bs-moment/create/clone.ts b/src/chronos/create/clone.ts similarity index 100% rename from src/bs-moment/create/clone.ts rename to src/chronos/create/clone.ts diff --git a/src/bs-moment/create/date-from-array.ts b/src/chronos/create/date-from-array.ts similarity index 100% rename from src/bs-moment/create/date-from-array.ts rename to src/chronos/create/date-from-array.ts diff --git a/src/bs-moment/create/from-anything.ts b/src/chronos/create/from-anything.ts similarity index 100% rename from src/bs-moment/create/from-anything.ts rename to src/chronos/create/from-anything.ts diff --git a/src/bs-moment/create/from-array.ts b/src/chronos/create/from-array.ts similarity index 100% rename from src/bs-moment/create/from-array.ts rename to src/chronos/create/from-array.ts diff --git a/src/bs-moment/create/from-object.ts b/src/chronos/create/from-object.ts similarity index 100% rename from src/bs-moment/create/from-object.ts rename to src/chronos/create/from-object.ts diff --git a/src/bs-moment/create/from-string-and-array.ts b/src/chronos/create/from-string-and-array.ts similarity index 100% rename from src/bs-moment/create/from-string-and-array.ts rename to src/chronos/create/from-string-and-array.ts diff --git a/src/bs-moment/create/from-string-and-format.ts b/src/chronos/create/from-string-and-format.ts similarity index 100% rename from src/bs-moment/create/from-string-and-format.ts rename to src/chronos/create/from-string-and-format.ts diff --git a/src/bs-moment/create/from-string.ts b/src/chronos/create/from-string.ts similarity index 100% rename from src/bs-moment/create/from-string.ts rename to src/chronos/create/from-string.ts diff --git a/src/bs-moment/create/local.ts b/src/chronos/create/local.ts similarity index 100% rename from src/bs-moment/create/local.ts rename to src/chronos/create/local.ts diff --git a/src/bs-moment/create/parsing-flags.ts b/src/chronos/create/parsing-flags.ts similarity index 100% rename from src/bs-moment/create/parsing-flags.ts rename to src/chronos/create/parsing-flags.ts diff --git a/src/bs-moment/create/parsing.types.ts b/src/chronos/create/parsing.types.ts similarity index 100% rename from src/bs-moment/create/parsing.types.ts rename to src/chronos/create/parsing.types.ts diff --git a/src/bs-moment/create/utc.ts b/src/chronos/create/utc.ts similarity index 100% rename from src/bs-moment/create/utc.ts rename to src/chronos/create/utc.ts diff --git a/src/bs-moment/create/valid.ts b/src/chronos/create/valid.ts similarity index 100% rename from src/bs-moment/create/valid.ts rename to src/chronos/create/valid.ts diff --git a/src/bs-moment/duration/bubble.ts b/src/chronos/duration/bubble.ts similarity index 100% rename from src/bs-moment/duration/bubble.ts rename to src/chronos/duration/bubble.ts diff --git a/src/bs-moment/duration/constructor.ts b/src/chronos/duration/constructor.ts similarity index 100% rename from src/bs-moment/duration/constructor.ts rename to src/chronos/duration/constructor.ts diff --git a/src/bs-moment/duration/create.ts b/src/chronos/duration/create.ts similarity index 100% rename from src/bs-moment/duration/create.ts rename to src/chronos/duration/create.ts diff --git a/src/bs-moment/duration/humanize.ts b/src/chronos/duration/humanize.ts similarity index 100% rename from src/bs-moment/duration/humanize.ts rename to src/chronos/duration/humanize.ts diff --git a/src/bs-moment/duration/valid.ts b/src/chronos/duration/valid.ts similarity index 100% rename from src/bs-moment/duration/valid.ts rename to src/chronos/duration/valid.ts diff --git a/src/bs-moment/format.ts b/src/chronos/format.ts similarity index 100% rename from src/bs-moment/format.ts rename to src/chronos/format.ts diff --git a/src/bs-moment/format/format.ts b/src/chronos/format/format.ts similarity index 100% rename from src/bs-moment/format/format.ts rename to src/chronos/format/format.ts diff --git a/src/bs-moment/i18n/ar.ts b/src/chronos/i18n/ar.ts similarity index 99% rename from src/bs-moment/i18n/ar.ts rename to src/chronos/i18n/ar.ts index d10a20ac2f..29b352a3d2 100644 --- a/src/bs-moment/i18n/ar.ts +++ b/src/chronos/i18n/ar.ts @@ -69,7 +69,7 @@ const months: string[] = [ 'ديسمبر' ]; -export const ar: LocaleData = { +export const arLocale: LocaleData = { abbr: 'ar', months, monthsShort: months, diff --git a/src/bs-moment/i18n/cs.ts b/src/chronos/i18n/cs.ts similarity index 99% rename from src/bs-moment/i18n/cs.ts rename to src/chronos/i18n/cs.ts index ba857fff52..bc536eeffb 100644 --- a/src/bs-moment/i18n/cs.ts +++ b/src/chronos/i18n/cs.ts @@ -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, diff --git a/src/bs-moment/i18n/de.ts b/src/chronos/i18n/de.ts similarity index 98% rename from src/bs-moment/i18n/de.ts rename to src/chronos/i18n/de.ts index e2c857c048..f22d825b9a 100644 --- a/src/bs-moment/i18n/de.ts +++ b/src/chronos/i18n/de.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/en-gb.ts b/src/chronos/i18n/en-gb.ts similarity index 98% rename from src/bs-moment/i18n/en-gb.ts rename to src/chronos/i18n/en-gb.ts index bf35d51694..9cb8d2625e 100644 --- a/src/bs-moment/i18n/en-gb.ts +++ b/src/chronos/i18n/en-gb.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/es-do.ts b/src/chronos/i18n/es-do.ts similarity index 98% rename from src/bs-moment/i18n/es-do.ts rename to src/chronos/i18n/es-do.ts index 2e4b44fdbc..8f6a687bae 100644 --- a/src/bs-moment/i18n/es-do.ts +++ b/src/chronos/i18n/es-do.ts @@ -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[] { diff --git a/src/bs-moment/i18n/es-us.ts b/src/chronos/i18n/es-us.ts similarity index 98% rename from src/bs-moment/i18n/es-us.ts rename to src/chronos/i18n/es-us.ts index 642569d7b1..996bbd5d86 100644 --- a/src/bs-moment/i18n/es-us.ts +++ b/src/chronos/i18n/es-us.ts @@ -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[] { diff --git a/src/bs-moment/i18n/es.ts b/src/chronos/i18n/es.ts similarity index 98% rename from src/bs-moment/i18n/es.ts rename to src/chronos/i18n/es.ts index 4808a3c3bd..b945bc9733 100644 --- a/src/bs-moment/i18n/es.ts +++ b/src/chronos/i18n/es.ts @@ -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[] { diff --git a/src/bs-moment/i18n/fr.ts b/src/chronos/i18n/fr.ts similarity index 98% rename from src/bs-moment/i18n/fr.ts rename to src/chronos/i18n/fr.ts index e29506ec69..a7b4dd1223 100644 --- a/src/bs-moment/i18n/fr.ts +++ b/src/chronos/i18n/fr.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/he.ts b/src/chronos/i18n/he.ts similarity index 98% rename from src/bs-moment/i18n/he.ts rename to src/chronos/i18n/he.ts index 69405359f4..4c9bb316cf 100644 --- a/src/bs-moment/i18n/he.ts +++ b/src/chronos/i18n/he.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/hi.ts b/src/chronos/i18n/hi.ts similarity index 99% rename from src/bs-moment/i18n/hi.ts rename to src/chronos/i18n/hi.ts index 05d0d0ccc5..257bec2135 100644 --- a/src/bs-moment/i18n/hi.ts +++ b/src/chronos/i18n/hi.ts @@ -35,7 +35,7 @@ let symbolMap: {[key: string]: string} = { '०': '0' }; -export const hi: LocaleData = { +export const hiLocale: LocaleData = { abbr: 'hi', months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), diff --git a/src/bs-moment/i18n/hu.ts b/src/chronos/i18n/hu.ts similarity index 98% rename from src/bs-moment/i18n/hu.ts rename to src/chronos/i18n/hu.ts index 3498140c38..3dcec5f57e 100644 --- a/src/bs-moment/i18n/hu.ts +++ b/src/chronos/i18n/hu.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/it.ts b/src/chronos/i18n/it.ts similarity index 98% rename from src/bs-moment/i18n/it.ts rename to src/chronos/i18n/it.ts index 07478be92b..da4c6d0653 100644 --- a/src/bs-moment/i18n/it.ts +++ b/src/chronos/i18n/it.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/ja.ts b/src/chronos/i18n/ja.ts similarity index 98% rename from src/bs-moment/i18n/ja.ts rename to src/chronos/i18n/ja.ts index 8d2820458f..890b10a893 100644 --- a/src/bs-moment/i18n/ja.ts +++ b/src/chronos/i18n/ja.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/ko.ts b/src/chronos/i18n/ko.ts similarity index 98% rename from src/bs-moment/i18n/ko.ts rename to src/chronos/i18n/ko.ts index 184ec12f6e..884d8a8c28 100644 --- a/src/bs-moment/i18n/ko.ts +++ b/src/chronos/i18n/ko.ts @@ -11,7 +11,7 @@ import { LocaleData } from '../locale/locale.class'; //! author : Kyungwook, Park : https://github.com/kyungw00k //! author : Jeeeyul Lee -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('_'), diff --git a/src/bs-moment/i18n/nl-be.ts b/src/chronos/i18n/nl-be.ts similarity index 98% rename from src/bs-moment/i18n/nl-be.ts rename to src/chronos/i18n/nl-be.ts index f0d1b9c0e2..5b585f0516 100644 --- a/src/bs-moment/i18n/nl-be.ts +++ b/src/chronos/i18n/nl-be.ts @@ -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[] { diff --git a/src/bs-moment/i18n/nl.ts b/src/chronos/i18n/nl.ts similarity index 98% rename from src/bs-moment/i18n/nl.ts rename to src/chronos/i18n/nl.ts index 855e9b74e6..c2ab76815d 100644 --- a/src/bs-moment/i18n/nl.ts +++ b/src/chronos/i18n/nl.ts @@ -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[] { diff --git a/src/bs-moment/i18n/pl.ts b/src/chronos/i18n/pl.ts similarity index 99% rename from src/bs-moment/i18n/pl.ts rename to src/chronos/i18n/pl.ts index b81582bea5..fe63face81 100755 --- a/src/bs-moment/i18n/pl.ts +++ b/src/chronos/i18n/pl.ts @@ -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) { diff --git a/src/bs-moment/i18n/pt-br.ts b/src/chronos/i18n/pt-br.ts similarity index 98% rename from src/bs-moment/i18n/pt-br.ts rename to src/chronos/i18n/pt-br.ts index ac248418df..797a39fca2 100644 --- a/src/bs-moment/i18n/pt-br.ts +++ b/src/chronos/i18n/pt-br.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/ru.ts b/src/chronos/i18n/ru.ts similarity index 99% rename from src/bs-moment/i18n/ru.ts rename to src/chronos/i18n/ru.ts index dc2837f8be..110148f7ea 100644 --- a/src/bs-moment/i18n/ru.ts +++ b/src/chronos/i18n/ru.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/sv.ts b/src/chronos/i18n/sv.ts similarity index 98% rename from src/bs-moment/i18n/sv.ts rename to src/chronos/i18n/sv.ts index 74b0ffcd06..181c2f9794 100644 --- a/src/bs-moment/i18n/sv.ts +++ b/src/chronos/i18n/sv.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/th.ts b/src/chronos/i18n/th.ts similarity index 98% rename from src/bs-moment/i18n/th.ts rename to src/chronos/i18n/th.ts index 070ffdaf23..8bf0da40ab 100644 --- a/src/bs-moment/i18n/th.ts +++ b/src/chronos/i18n/th.ts @@ -9,7 +9,7 @@ import { LocaleData } from '../locale/locale.class'; -export const th: LocaleData = { +export const thLocale: LocaleData = { abbr: 'th', months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), diff --git a/src/bs-moment/i18n/tr.ts b/src/chronos/i18n/tr.ts similarity index 98% rename from src/bs-moment/i18n/tr.ts rename to src/chronos/i18n/tr.ts index 8aa2934b9e..f8ca4d20c6 100644 --- a/src/bs-moment/i18n/tr.ts +++ b/src/chronos/i18n/tr.ts @@ -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('_'), diff --git a/src/bs-moment/i18n/uk.ts b/src/chronos/i18n/uk.ts similarity index 99% rename from src/bs-moment/i18n/uk.ts rename to src/chronos/i18n/uk.ts index 264e59780b..0d92989e5f 100644 --- a/src/bs-moment/i18n/uk.ts +++ b/src/chronos/i18n/uk.ts @@ -62,7 +62,7 @@ function processHoursFunction(str: string) { }; } -export const uk: LocaleData = { +export const ukLocale: LocaleData = { abbr: 'uk', months: { format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'), diff --git a/src/bs-moment/i18n/zh-cn.ts b/src/chronos/i18n/zh-cn.ts similarity index 98% rename from src/bs-moment/i18n/zh-cn.ts rename to src/chronos/i18n/zh-cn.ts index 53a6a15ca5..8182668d93 100644 --- a/src/bs-moment/i18n/zh-cn.ts +++ b/src/chronos/i18n/zh-cn.ts @@ -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('_'), diff --git a/src/bs-moment/index.ts b/src/chronos/index.ts similarity index 100% rename from src/bs-moment/index.ts rename to src/chronos/index.ts diff --git a/src/bs-moment/locale/calendar.ts b/src/chronos/locale/calendar.ts similarity index 100% rename from src/bs-moment/locale/calendar.ts rename to src/chronos/locale/calendar.ts diff --git a/src/bs-moment/locale/locale.class.ts b/src/chronos/locale/locale.class.ts similarity index 100% rename from src/bs-moment/locale/locale.class.ts rename to src/chronos/locale/locale.class.ts diff --git a/src/bs-moment/locale/locale.defaults.ts b/src/chronos/locale/locale.defaults.ts similarity index 100% rename from src/bs-moment/locale/locale.defaults.ts rename to src/chronos/locale/locale.defaults.ts diff --git a/src/bs-moment/locale/locales.ts b/src/chronos/locale/locales.ts similarity index 100% rename from src/bs-moment/locale/locales.ts rename to src/chronos/locale/locales.ts diff --git a/src/bs-moment/moment/add-subtract.ts b/src/chronos/moment/add-subtract.ts similarity index 100% rename from src/bs-moment/moment/add-subtract.ts rename to src/chronos/moment/add-subtract.ts diff --git a/src/bs-moment/moment/calendar.ts b/src/chronos/moment/calendar.ts similarity index 100% rename from src/bs-moment/moment/calendar.ts rename to src/chronos/moment/calendar.ts diff --git a/src/bs-moment/moment/diff.ts b/src/chronos/moment/diff.ts similarity index 100% rename from src/bs-moment/moment/diff.ts rename to src/chronos/moment/diff.ts diff --git a/src/bs-moment/moment/from.ts b/src/chronos/moment/from.ts similarity index 100% rename from src/bs-moment/moment/from.ts rename to src/chronos/moment/from.ts diff --git a/src/bs-moment/moment/min-max.ts b/src/chronos/moment/min-max.ts similarity index 100% rename from src/bs-moment/moment/min-max.ts rename to src/chronos/moment/min-max.ts diff --git a/src/bs-moment/parse/regex.ts b/src/chronos/parse/regex.ts similarity index 100% rename from src/bs-moment/parse/regex.ts rename to src/chronos/parse/regex.ts diff --git a/src/bs-moment/parse/token.ts b/src/chronos/parse/token.ts similarity index 100% rename from src/bs-moment/parse/token.ts rename to src/chronos/parse/token.ts diff --git a/src/bs-moment/test/chain.ts b/src/chronos/test/chain.ts similarity index 100% rename from src/bs-moment/test/chain.ts rename to src/chronos/test/chain.ts diff --git a/src/bs-moment/test/locale/ar.spec.ts b/src/chronos/test/locale/ar.spec.ts similarity index 99% rename from src/bs-moment/test/locale/ar.spec.ts rename to src/chronos/test/locale/ar.spec.ts index 9bdde76e92..2096b8dcf6 100644 --- a/src/bs-moment/test/locale/ar.spec.ts +++ b/src/chronos/test/locale/ar.spec.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { ar } from '../../i18n/ar'; +import { arLocale } from '../../i18n/ar'; // localeModule('ar'); @@ -24,7 +24,7 @@ var months = [ ]; describe('locale: ar', () => { beforeAll(() => { - moment.locale('ar', ar); + moment.locale('ar', arLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/cs.spec.ts b/src/chronos/test/locale/cs.spec.ts similarity index 99% rename from src/bs-moment/test/locale/cs.spec.ts rename to src/chronos/test/locale/cs.spec.ts index 8b0122de33..cdc066f152 100644 --- a/src/bs-moment/test/locale/cs.spec.ts +++ b/src/chronos/test/locale/cs.spec.ts @@ -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(() => { diff --git a/src/bs-moment/test/locale/de.spec.ts b/src/chronos/test/locale/de.spec.ts similarity index 99% rename from src/bs-moment/test/locale/de.spec.ts rename to src/chronos/test/locale/de.spec.ts index ad4c795003..bae1912ae1 100644 --- a/src/bs-moment/test/locale/de.spec.ts +++ b/src/chronos/test/locale/de.spec.ts @@ -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(() => { diff --git a/src/bs-moment/test/locale/en-gb.spec.ts b/src/chronos/test/locale/en-gb.spec.ts similarity index 99% rename from src/bs-moment/test/locale/en-gb.spec.ts rename to src/chronos/test/locale/en-gb.spec.ts index ac35e07be9..0ae7248595 100644 --- a/src/bs-moment/test/locale/en-gb.spec.ts +++ b/src/chronos/test/locale/en-gb.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { enGb } from '../../i18n/en-gb'; +import { enGbLocale } from '../../i18n/en-gb'; // localeModule('en'); describe('locale: en-gb', () => { beforeAll(() => { - moment.locale('en-gb', enGb); + moment.locale('en-gb', enGbLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/en.spec.ts b/src/chronos/test/locale/en.spec.ts similarity index 100% rename from src/bs-moment/test/locale/en.spec.ts rename to src/chronos/test/locale/en.spec.ts diff --git a/src/bs-moment/test/locale/es-do.spec.ts b/src/chronos/test/locale/es-do.spec.ts similarity index 99% rename from src/bs-moment/test/locale/es-do.spec.ts rename to src/chronos/test/locale/es-do.spec.ts index a493cf9260..81b410ccec 100644 --- a/src/bs-moment/test/locale/es-do.spec.ts +++ b/src/chronos/test/locale/es-do.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { esDo } from '../../i18n/es-do'; +import { esDoLocale } from '../../i18n/es-do'; // localeModule('en'); describe('locale: es-do', () => { beforeAll(() => { - moment.locale('es-do', esDo); + moment.locale('es-do', esDoLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/es-us.spec.ts b/src/chronos/test/locale/es-us.spec.ts similarity index 99% rename from src/bs-moment/test/locale/es-us.spec.ts rename to src/chronos/test/locale/es-us.spec.ts index b6f0ceb46c..aa74a2e08f 100644 --- a/src/bs-moment/test/locale/es-us.spec.ts +++ b/src/chronos/test/locale/es-us.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { esUs } from '../../i18n/es-us'; +import { esUsLocale } from '../../i18n/es-us'; // localeModule('en'); describe('locale: es-us', () => { beforeAll(() => { - moment.locale('es-us', esUs); + moment.locale('es-us', esUsLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/es.spec.ts b/src/chronos/test/locale/es.spec.ts similarity index 99% rename from src/bs-moment/test/locale/es.spec.ts rename to src/chronos/test/locale/es.spec.ts index d2adc7aa66..129dc708d5 100644 --- a/src/bs-moment/test/locale/es.spec.ts +++ b/src/chronos/test/locale/es.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { es } from '../../i18n/es'; +import { esLocale } from '../../i18n/es'; // localeModule('en'); describe('locale: es', () => { beforeAll(() => { - moment.locale('es', es); + moment.locale('es', esLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/fr.spec.ts b/src/chronos/test/locale/fr.spec.ts similarity index 99% rename from src/bs-moment/test/locale/fr.spec.ts rename to src/chronos/test/locale/fr.spec.ts index 83d94acb05..eb6e915774 100644 --- a/src/bs-moment/test/locale/fr.spec.ts +++ b/src/chronos/test/locale/fr.spec.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { fr } from '../../i18n/fr'; +import { frLocale } from '../../i18n/fr'; describe('locale: fr', () => { beforeAll(() => { - moment.locale('fr', fr); + moment.locale('fr', frLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/he.spec.ts b/src/chronos/test/locale/he.spec.ts similarity index 99% rename from src/bs-moment/test/locale/he.spec.ts rename to src/chronos/test/locale/he.spec.ts index 2c2c732ff2..e560b895de 100644 --- a/src/bs-moment/test/locale/he.spec.ts +++ b/src/chronos/test/locale/he.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { he } from '../../i18n/he'; +import { heLocale } from '../../i18n/he'; // localeModule('en'); describe('locale: he', () => { beforeAll(() => { - moment.locale('he', he); + moment.locale('he', heLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/hi.spec.ts b/src/chronos/test/locale/hi.spec.ts similarity index 99% rename from src/bs-moment/test/locale/hi.spec.ts rename to src/chronos/test/locale/hi.spec.ts index db9c82b5ee..3ab1f1005c 100644 --- a/src/bs-moment/test/locale/hi.spec.ts +++ b/src/chronos/test/locale/hi.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { hi } from '../../i18n/hi'; +import { hiLocale } from '../../i18n/hi'; // localeModule('en'); describe('locale: hi', () => { beforeAll(() => { - moment.locale('hi', hi); + moment.locale('hi', hiLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/hu.spec.ts b/src/chronos/test/locale/hu.spec.ts similarity index 99% rename from src/bs-moment/test/locale/hu.spec.ts rename to src/chronos/test/locale/hu.spec.ts index 42e202641a..b75312d241 100644 --- a/src/bs-moment/test/locale/hu.spec.ts +++ b/src/chronos/test/locale/hu.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { hu } from '../../i18n/hu'; +import { huLocale } from '../../i18n/hu'; // localeModule('en'); describe('locale: hu', () => { beforeAll(() => { - moment.locale('hu', hu); + moment.locale('hu', huLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/it.spec.ts b/src/chronos/test/locale/it.spec.ts similarity index 99% rename from src/bs-moment/test/locale/it.spec.ts rename to src/chronos/test/locale/it.spec.ts index 2eb8c759c3..2533c96ae5 100644 --- a/src/bs-moment/test/locale/it.spec.ts +++ b/src/chronos/test/locale/it.spec.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { it as italy } from '../../i18n/it'; +import { itLocale as italy } from '../../i18n/it'; // localeModule('en'); describe('locale: it', () => { diff --git a/src/bs-moment/test/locale/ja.spec.ts b/src/chronos/test/locale/ja.spec.ts similarity index 99% rename from src/bs-moment/test/locale/ja.spec.ts rename to src/chronos/test/locale/ja.spec.ts index 5b5b07f3d5..c541e9bd4a 100644 --- a/src/bs-moment/test/locale/ja.spec.ts +++ b/src/chronos/test/locale/ja.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { ja } from '../../i18n/ja'; +import { jaLocale } from '../../i18n/ja'; // localeModule('en'); describe('locale: ja', () => { beforeAll(() => { - moment.locale('ja', ja); + moment.locale('ja', jaLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/ko.spec.ts b/src/chronos/test/locale/ko.spec.ts similarity index 99% rename from src/bs-moment/test/locale/ko.spec.ts rename to src/chronos/test/locale/ko.spec.ts index 5e1767e3fb..05c40d7de6 100644 --- a/src/bs-moment/test/locale/ko.spec.ts +++ b/src/chronos/test/locale/ko.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { ko } from '../../i18n/ko'; +import { koLocale } from '../../i18n/ko'; // localeModule('en'); describe('locale: ko', () => { beforeAll(() => { - moment.locale('ko', ko); + moment.locale('ko', koLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/nl-be.spec.ts b/src/chronos/test/locale/nl-be.spec.ts similarity index 99% rename from src/bs-moment/test/locale/nl-be.spec.ts rename to src/chronos/test/locale/nl-be.spec.ts index 5c247bd4e2..9e5491ff75 100644 --- a/src/bs-moment/test/locale/nl-be.spec.ts +++ b/src/chronos/test/locale/nl-be.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { nlBe } from '../../i18n/nl-be'; +import { nlBeLocale } from '../../i18n/nl-be'; // localeModule('en'); describe('locale: nl-be', () => { beforeAll(() => { - moment.locale('nl-be', nlBe); + moment.locale('nl-be', nlBeLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/nl.spec.ts b/src/chronos/test/locale/nl.spec.ts similarity index 99% rename from src/bs-moment/test/locale/nl.spec.ts rename to src/chronos/test/locale/nl.spec.ts index c4bb67f1f7..f084a7fcd4 100644 --- a/src/bs-moment/test/locale/nl.spec.ts +++ b/src/chronos/test/locale/nl.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { nl } from '../../i18n/nl'; +import { nlLocale } from '../../i18n/nl'; // localeModule('en'); describe('locale: nl', () => { beforeAll(() => { - moment.locale('nl', nl); + moment.locale('nl', nlLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/pl.spec.ts b/src/chronos/test/locale/pl.spec.ts similarity index 99% rename from src/bs-moment/test/locale/pl.spec.ts rename to src/chronos/test/locale/pl.spec.ts index 9eb2810f5e..ff33743237 100755 --- a/src/bs-moment/test/locale/pl.spec.ts +++ b/src/chronos/test/locale/pl.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { pl } from '../../i18n/pl'; +import { plLocale } from '../../i18n/pl'; // localeModule('en'); describe('locale: pl', () => { beforeAll(() => { - moment.locale('pl', pl); + moment.locale('pl', plLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/pt-br.spec.ts b/src/chronos/test/locale/pt-br.spec.ts similarity index 99% rename from src/bs-moment/test/locale/pt-br.spec.ts rename to src/chronos/test/locale/pt-br.spec.ts index 219765d3eb..3b14b00e7f 100644 --- a/src/bs-moment/test/locale/pt-br.spec.ts +++ b/src/chronos/test/locale/pt-br.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { ptBr } from '../../i18n/pt-br'; +import { ptBrLocale } from '../../i18n/pt-br'; // localeModule('en'); describe('locale: pt-br', () => { beforeAll(() => { - moment.locale('pt-br', ptBr); + moment.locale('pt-br', ptBrLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/ru.spec.ts b/src/chronos/test/locale/ru.spec.ts similarity index 99% rename from src/bs-moment/test/locale/ru.spec.ts rename to src/chronos/test/locale/ru.spec.ts index 4af9b0fb27..086344ddb2 100644 --- a/src/bs-moment/test/locale/ru.spec.ts +++ b/src/chronos/test/locale/ru.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { ru } from '../../i18n/ru'; +import { ruLocale } from '../../i18n/ru'; // localeModule('en'); describe('locale: ru', () => { beforeAll(() => { - moment.locale('ru', ru); + moment.locale('ru', ruLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/sv.spec.ts b/src/chronos/test/locale/sv.spec.ts similarity index 99% rename from src/bs-moment/test/locale/sv.spec.ts rename to src/chronos/test/locale/sv.spec.ts index 872abb3fb0..286460b559 100644 --- a/src/bs-moment/test/locale/sv.spec.ts +++ b/src/chronos/test/locale/sv.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { sv } from '../../i18n/sv'; +import { svLocale } from '../../i18n/sv'; // localeModule('en'); describe('locale: sv', () => { beforeAll(() => { - moment.locale('sv', sv); + moment.locale('sv', svLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/th.spec.ts b/src/chronos/test/locale/th.spec.ts similarity index 99% rename from src/bs-moment/test/locale/th.spec.ts rename to src/chronos/test/locale/th.spec.ts index e27e4daf7c..2dcae1bae7 100644 --- a/src/bs-moment/test/locale/th.spec.ts +++ b/src/chronos/test/locale/th.spec.ts @@ -4,13 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { th } from '../../i18n/th'; -import { tr } from '../../i18n/tr'; +import { thLocale } from '../../i18n/th'; describe('locale: th', () => { // localeModule('th'); beforeAll(() => { - moment.locale('th', th); + moment.locale('th', thLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/tr.spec.ts b/src/chronos/test/locale/tr.spec.ts similarity index 99% rename from src/bs-moment/test/locale/tr.spec.ts rename to src/chronos/test/locale/tr.spec.ts index 03b8f41770..cae3e000d8 100644 --- a/src/bs-moment/test/locale/tr.spec.ts +++ b/src/chronos/test/locale/tr.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { tr } from '../../i18n/tr'; +import { trLocale } from '../../i18n/tr'; // localeModule('en'); describe('locale: tr', () => { beforeAll(() => { - moment.locale('tr', tr); + moment.locale('tr', trLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/uk.spec.ts b/src/chronos/test/locale/uk.spec.ts similarity index 99% rename from src/bs-moment/test/locale/uk.spec.ts rename to src/chronos/test/locale/uk.spec.ts index 8cc3eb79ac..f5c922f9d4 100644 --- a/src/bs-moment/test/locale/uk.spec.ts +++ b/src/chronos/test/locale/uk.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { uk } from '../../i18n/uk'; +import { ukLocale } from '../../i18n/uk'; // localeModule('uk'); describe('locale: uk', () => { beforeAll(() => { - moment.locale('uk', uk); + moment.locale('uk', ukLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/locale/zh-cn.spec.ts b/src/chronos/test/locale/zh-cn.spec.ts similarity index 99% rename from src/bs-moment/test/locale/zh-cn.spec.ts rename to src/chronos/test/locale/zh-cn.spec.ts index bfcf5f6ae8..eb487ce89d 100644 --- a/src/bs-moment/test/locale/zh-cn.spec.ts +++ b/src/chronos/test/locale/zh-cn.spec.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { moment } from '../chain'; -import { zhCn } from '../../i18n/zh-cn'; +import { zhCnLocale } from '../../i18n/zh-cn'; // localeModule('en'); describe('locale: zh-cn', () => { beforeAll(() => { - moment.locale('zh-cn', zhCn); + moment.locale('zh-cn', zhCnLocale); }); afterAll(() => { diff --git a/src/bs-moment/test/moment/add_subtract.spec.ts b/src/chronos/test/moment/add_subtract.spec.ts similarity index 100% rename from src/bs-moment/test/moment/add_subtract.spec.ts rename to src/chronos/test/moment/add_subtract.spec.ts diff --git a/src/bs-moment/test/moment/calendar.spec.ts b/src/chronos/test/moment/calendar.spec.ts similarity index 100% rename from src/bs-moment/test/moment/calendar.spec.ts rename to src/chronos/test/moment/calendar.spec.ts diff --git a/src/bs-moment/test/moment/create.spec.ts b/src/chronos/test/moment/create.spec.ts similarity index 99% rename from src/bs-moment/test/moment/create.spec.ts rename to src/chronos/test/moment/create.spec.ts index 1eab80747e..480994093b 100644 --- a/src/bs-moment/test/moment/create.spec.ts +++ b/src/chronos/test/moment/create.spec.ts @@ -3,7 +3,7 @@ // tslint:disable:variable-name import { assert } from 'chai'; import { moment } from '../chain'; -import { ru } from '../../i18n/ru'; +import { ruLocale } from '../../i18n/ru'; describe('create', () => { @@ -554,7 +554,7 @@ describe('create', () => { let testCase; try { - moment.locale('ru', ru); + moment.locale('ru', ruLocale); for (testCase in testCases) { const testResult = moment(testCases[testCase], moment.RFC_2822, true); assert.ok(testResult.isValid(), testResult.toString()); @@ -573,7 +573,7 @@ describe('create', () => { let testCase; try { - moment.locale('ru', ru); + moment.locale('ru', ruLocale); for (testCase in testCases) { const testResult = moment(testCases[testCase], moment.RFC_2822, true); assert.ok(!testResult.isValid(), testResult.toString()); diff --git a/src/bs-moment/test/moment/days_in_month.spec.ts b/src/chronos/test/moment/days_in_month.spec.ts similarity index 100% rename from src/bs-moment/test/moment/days_in_month.spec.ts rename to src/chronos/test/moment/days_in_month.spec.ts diff --git a/src/bs-moment/test/moment/days_in_year.spec.ts b/src/chronos/test/moment/days_in_year.spec.ts similarity index 100% rename from src/bs-moment/test/moment/days_in_year.spec.ts rename to src/chronos/test/moment/days_in_year.spec.ts diff --git a/src/bs-moment/test/moment/diff.spec.ts b/src/chronos/test/moment/diff.spec.ts similarity index 100% rename from src/bs-moment/test/moment/diff.spec.ts rename to src/chronos/test/moment/diff.spec.ts diff --git a/src/bs-moment/test/moment/format.spec.ts b/src/chronos/test/moment/format.spec.ts similarity index 100% rename from src/bs-moment/test/moment/format.spec.ts rename to src/chronos/test/moment/format.spec.ts diff --git a/src/bs-moment/test/moment/getters_setters.spec.ts b/src/chronos/test/moment/getters_setters.spec.ts similarity index 100% rename from src/bs-moment/test/moment/getters_setters.spec.ts rename to src/chronos/test/moment/getters_setters.spec.ts diff --git a/src/bs-moment/test/moment/is_after.spec.ts b/src/chronos/test/moment/is_after.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_after.spec.ts rename to src/chronos/test/moment/is_after.spec.ts diff --git a/src/bs-moment/test/moment/is_array.spec.ts b/src/chronos/test/moment/is_array.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_array.spec.ts rename to src/chronos/test/moment/is_array.spec.ts diff --git a/src/bs-moment/test/moment/is_before.spec.ts b/src/chronos/test/moment/is_before.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_before.spec.ts rename to src/chronos/test/moment/is_before.spec.ts diff --git a/src/bs-moment/test/moment/is_between.spec.ts b/src/chronos/test/moment/is_between.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_between.spec.ts rename to src/chronos/test/moment/is_between.spec.ts diff --git a/src/bs-moment/test/moment/is_date.spec.ts b/src/chronos/test/moment/is_date.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_date.spec.ts rename to src/chronos/test/moment/is_date.spec.ts diff --git a/src/bs-moment/test/moment/is_moment.spec.ts b/src/chronos/test/moment/is_moment.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_moment.spec.ts rename to src/chronos/test/moment/is_moment.spec.ts diff --git a/src/bs-moment/test/moment/is_number.spec.ts b/src/chronos/test/moment/is_number.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_number.spec.ts rename to src/chronos/test/moment/is_number.spec.ts diff --git a/src/bs-moment/test/moment/is_same.spec.ts b/src/chronos/test/moment/is_same.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_same.spec.ts rename to src/chronos/test/moment/is_same.spec.ts diff --git a/src/bs-moment/test/moment/is_same_or_after.spec.ts b/src/chronos/test/moment/is_same_or_after.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_same_or_after.spec.ts rename to src/chronos/test/moment/is_same_or_after.spec.ts diff --git a/src/bs-moment/test/moment/is_same_or_before.spec.ts b/src/chronos/test/moment/is_same_or_before.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_same_or_before.spec.ts rename to src/chronos/test/moment/is_same_or_before.spec.ts diff --git a/src/bs-moment/test/moment/is_valid.spec.ts b/src/chronos/test/moment/is_valid.spec.ts similarity index 100% rename from src/bs-moment/test/moment/is_valid.spec.ts rename to src/chronos/test/moment/is_valid.spec.ts diff --git a/src/bs-moment/test/moment/leapyear.spec.ts b/src/chronos/test/moment/leapyear.spec.ts similarity index 100% rename from src/bs-moment/test/moment/leapyear.spec.ts rename to src/chronos/test/moment/leapyear.spec.ts diff --git a/src/bs-moment/test/moment/listers.spec.ts b/src/chronos/test/moment/listers.spec.ts similarity index 100% rename from src/bs-moment/test/moment/listers.spec.ts rename to src/chronos/test/moment/listers.spec.ts diff --git a/src/bs-moment/test/moment/locale.spec.ts b/src/chronos/test/moment/locale.spec.ts similarity index 98% rename from src/bs-moment/test/moment/locale.spec.ts rename to src/chronos/test/moment/locale.spec.ts index c9ca5c7d61..867295a86a 100644 --- a/src/bs-moment/test/moment/locale.spec.ts +++ b/src/chronos/test/moment/locale.spec.ts @@ -4,21 +4,21 @@ import { assert } from 'chai'; import { moment } from '../chain'; import { defineLocale } from '../../locale/locales'; -import { enGb } from '../../i18n/en-gb'; -import { fr } from '../../i18n/fr'; -import { es } from '../../i18n/es'; -import { zhCn } from '../../i18n/zh-cn'; -import { it as italy } from '../../i18n/it'; +import { enGbLocale } from '../../i18n/en-gb'; +import { frLocale } from '../../i18n/fr'; +import { esLocale } from '../../i18n/es'; +import { zhCnLocale } from '../../i18n/zh-cn'; +import { itLocale as italy } from '../../i18n/it'; import { getDate } from '../../utils/date-getters'; -defineLocale('en-gb', enGb); -defineLocale('en-ca', enGb); -defineLocale('es', es); -defineLocale('fr', fr); -defineLocale('fr-ca', fr); +defineLocale('en-gb', enGbLocale); +defineLocale('en-ca', enGbLocale); +defineLocale('es', esLocale); +defineLocale('fr', frLocale); +defineLocale('fr-ca', frLocale); defineLocale('it', italy); -defineLocale('it', zhCn); -defineLocale('zh-cn', zhCn); +defineLocale('it', zhCnLocale); +defineLocale('zh-cn', zhCnLocale); moment.locale('en'); diff --git a/src/bs-moment/test/moment/locale_inheritance.spec.ts b/src/chronos/test/moment/locale_inheritance.spec.ts similarity index 100% rename from src/bs-moment/test/moment/locale_inheritance.spec.ts rename to src/chronos/test/moment/locale_inheritance.spec.ts diff --git a/src/bs-moment/test/moment/locale_update.spec.ts b/src/chronos/test/moment/locale_update.spec.ts similarity index 100% rename from src/bs-moment/test/moment/locale_update.spec.ts rename to src/chronos/test/moment/locale_update.spec.ts diff --git a/src/bs-moment/test/moment/min_max.spec.ts b/src/chronos/test/moment/min_max.spec.ts similarity index 100% rename from src/bs-moment/test/moment/min_max.spec.ts rename to src/chronos/test/moment/min_max.spec.ts diff --git a/src/bs-moment/test/moment/preparse_postformat.spec.ts b/src/chronos/test/moment/preparse_postformat.spec.ts similarity index 100% rename from src/bs-moment/test/moment/preparse_postformat.spec.ts rename to src/chronos/test/moment/preparse_postformat.spec.ts diff --git a/src/bs-moment/test/moment/quarter.spec.ts b/src/chronos/test/moment/quarter.spec.ts similarity index 100% rename from src/bs-moment/test/moment/quarter.spec.ts rename to src/chronos/test/moment/quarter.spec.ts diff --git a/src/bs-moment/test/moment/start_end_of.spec.ts b/src/chronos/test/moment/start_end_of.spec.ts similarity index 100% rename from src/bs-moment/test/moment/start_end_of.spec.ts rename to src/chronos/test/moment/start_end_of.spec.ts diff --git a/src/bs-moment/test/moment/to_type.spec.ts b/src/chronos/test/moment/to_type.spec.ts similarity index 100% rename from src/bs-moment/test/moment/to_type.spec.ts rename to src/chronos/test/moment/to_type.spec.ts diff --git a/src/bs-moment/test/moment/utc.spec.ts b/src/chronos/test/moment/utc.spec.ts similarity index 100% rename from src/bs-moment/test/moment/utc.spec.ts rename to src/chronos/test/moment/utc.spec.ts diff --git a/src/bs-moment/test/moment/utc_offset.spec.ts b/src/chronos/test/moment/utc_offset.spec.ts similarity index 100% rename from src/bs-moment/test/moment/utc_offset.spec.ts rename to src/chronos/test/moment/utc_offset.spec.ts diff --git a/src/bs-moment/test/moment/week_year.spec.ts b/src/chronos/test/moment/week_year.spec.ts similarity index 100% rename from src/bs-moment/test/moment/week_year.spec.ts rename to src/chronos/test/moment/week_year.spec.ts diff --git a/src/bs-moment/test/moment/weekday.spec.ts b/src/chronos/test/moment/weekday.spec.ts similarity index 100% rename from src/bs-moment/test/moment/weekday.spec.ts rename to src/chronos/test/moment/weekday.spec.ts diff --git a/src/bs-moment/test/moment/weeks.spec.ts b/src/chronos/test/moment/weeks.spec.ts similarity index 100% rename from src/bs-moment/test/moment/weeks.spec.ts rename to src/chronos/test/moment/weeks.spec.ts diff --git a/src/bs-moment/test/moment/weeks_in_year.spec.ts b/src/chronos/test/moment/weeks_in_year.spec.ts similarity index 100% rename from src/bs-moment/test/moment/weeks_in_year.spec.ts rename to src/chronos/test/moment/weeks_in_year.spec.ts diff --git a/src/bs-moment/test/moment/zone_switching.spec.ts b/src/chronos/test/moment/zone_switching.spec.ts similarity index 100% rename from src/bs-moment/test/moment/zone_switching.spec.ts rename to src/chronos/test/moment/zone_switching.spec.ts diff --git a/src/bs-moment/test/test-helpers.ts b/src/chronos/test/test-helpers.ts similarity index 100% rename from src/bs-moment/test/test-helpers.ts rename to src/chronos/test/test-helpers.ts diff --git a/src/bs-moment/test/units.spec.ts b/src/chronos/test/units.spec.ts similarity index 100% rename from src/bs-moment/test/units.spec.ts rename to src/chronos/test/units.spec.ts diff --git a/src/bs-moment/types.ts b/src/chronos/types.ts similarity index 100% rename from src/bs-moment/types.ts rename to src/chronos/types.ts diff --git a/src/bs-moment/units/aliases.ts b/src/chronos/units/aliases.ts similarity index 100% rename from src/bs-moment/units/aliases.ts rename to src/chronos/units/aliases.ts diff --git a/src/bs-moment/units/constants.ts b/src/chronos/units/constants.ts similarity index 100% rename from src/bs-moment/units/constants.ts rename to src/chronos/units/constants.ts diff --git a/src/bs-moment/units/day-of-month.ts b/src/chronos/units/day-of-month.ts similarity index 100% rename from src/bs-moment/units/day-of-month.ts rename to src/chronos/units/day-of-month.ts diff --git a/src/bs-moment/units/day-of-week.ts b/src/chronos/units/day-of-week.ts similarity index 100% rename from src/bs-moment/units/day-of-week.ts rename to src/chronos/units/day-of-week.ts diff --git a/src/bs-moment/units/day-of-year.ts b/src/chronos/units/day-of-year.ts similarity index 100% rename from src/bs-moment/units/day-of-year.ts rename to src/chronos/units/day-of-year.ts diff --git a/src/bs-moment/units/hour.ts b/src/chronos/units/hour.ts similarity index 100% rename from src/bs-moment/units/hour.ts rename to src/chronos/units/hour.ts diff --git a/src/bs-moment/units/index.ts b/src/chronos/units/index.ts similarity index 100% rename from src/bs-moment/units/index.ts rename to src/chronos/units/index.ts diff --git a/src/bs-moment/units/millisecond.ts b/src/chronos/units/millisecond.ts similarity index 100% rename from src/bs-moment/units/millisecond.ts rename to src/chronos/units/millisecond.ts diff --git a/src/bs-moment/units/minute.ts b/src/chronos/units/minute.ts similarity index 100% rename from src/bs-moment/units/minute.ts rename to src/chronos/units/minute.ts diff --git a/src/bs-moment/units/month.ts b/src/chronos/units/month.ts similarity index 100% rename from src/bs-moment/units/month.ts rename to src/chronos/units/month.ts diff --git a/src/bs-moment/units/offset.ts b/src/chronos/units/offset.ts similarity index 100% rename from src/bs-moment/units/offset.ts rename to src/chronos/units/offset.ts diff --git a/src/bs-moment/units/priorities.ts b/src/chronos/units/priorities.ts similarity index 100% rename from src/bs-moment/units/priorities.ts rename to src/chronos/units/priorities.ts diff --git a/src/bs-moment/units/quarter.ts b/src/chronos/units/quarter.ts similarity index 100% rename from src/bs-moment/units/quarter.ts rename to src/chronos/units/quarter.ts diff --git a/src/bs-moment/units/second.ts b/src/chronos/units/second.ts similarity index 100% rename from src/bs-moment/units/second.ts rename to src/chronos/units/second.ts diff --git a/src/bs-moment/units/timestamp.ts b/src/chronos/units/timestamp.ts similarity index 100% rename from src/bs-moment/units/timestamp.ts rename to src/chronos/units/timestamp.ts diff --git a/src/bs-moment/units/timezone.ts b/src/chronos/units/timezone.ts similarity index 100% rename from src/bs-moment/units/timezone.ts rename to src/chronos/units/timezone.ts diff --git a/src/bs-moment/units/week-calendar-utils.ts b/src/chronos/units/week-calendar-utils.ts similarity index 100% rename from src/bs-moment/units/week-calendar-utils.ts rename to src/chronos/units/week-calendar-utils.ts diff --git a/src/bs-moment/units/week-year.ts b/src/chronos/units/week-year.ts similarity index 100% rename from src/bs-moment/units/week-year.ts rename to src/chronos/units/week-year.ts diff --git a/src/bs-moment/units/week.ts b/src/chronos/units/week.ts similarity index 100% rename from src/bs-moment/units/week.ts rename to src/chronos/units/week.ts diff --git a/src/bs-moment/units/year.ts b/src/chronos/units/year.ts similarity index 100% rename from src/bs-moment/units/year.ts rename to src/chronos/units/year.ts diff --git a/src/bs-moment/utils.ts b/src/chronos/utils.ts similarity index 100% rename from src/bs-moment/utils.ts rename to src/chronos/utils.ts diff --git a/src/bs-moment/utils/abs-ceil.ts b/src/chronos/utils/abs-ceil.ts similarity index 100% rename from src/bs-moment/utils/abs-ceil.ts rename to src/chronos/utils/abs-ceil.ts diff --git a/src/bs-moment/utils/abs-round.ts b/src/chronos/utils/abs-round.ts similarity index 100% rename from src/bs-moment/utils/abs-round.ts rename to src/chronos/utils/abs-round.ts diff --git a/src/bs-moment/utils/compare-arrays.ts b/src/chronos/utils/compare-arrays.ts similarity index 100% rename from src/bs-moment/utils/compare-arrays.ts rename to src/chronos/utils/compare-arrays.ts diff --git a/src/bs-moment/utils/date-compare.ts b/src/chronos/utils/date-compare.ts similarity index 100% rename from src/bs-moment/utils/date-compare.ts rename to src/chronos/utils/date-compare.ts diff --git a/src/bs-moment/utils/date-getters.ts b/src/chronos/utils/date-getters.ts similarity index 100% rename from src/bs-moment/utils/date-getters.ts rename to src/chronos/utils/date-getters.ts diff --git a/src/bs-moment/utils/date-setters.ts b/src/chronos/utils/date-setters.ts similarity index 100% rename from src/bs-moment/utils/date-setters.ts rename to src/chronos/utils/date-setters.ts diff --git a/src/bs-moment/utils/defaults.ts b/src/chronos/utils/defaults.ts similarity index 100% rename from src/bs-moment/utils/defaults.ts rename to src/chronos/utils/defaults.ts diff --git a/src/bs-moment/utils/start-end-of.ts b/src/chronos/utils/start-end-of.ts similarity index 100% rename from src/bs-moment/utils/start-end-of.ts rename to src/chronos/utils/start-end-of.ts diff --git a/src/bs-moment/utils/type-checks.ts b/src/chronos/utils/type-checks.ts similarity index 100% rename from src/bs-moment/utils/type-checks.ts rename to src/chronos/utils/type-checks.ts diff --git a/src/bs-moment/utils/zero-fill.ts b/src/chronos/utils/zero-fill.ts similarity index 100% rename from src/bs-moment/utils/zero-fill.ts rename to src/chronos/utils/zero-fill.ts diff --git a/src/datepicker/bs-datepicker-input.directive.ts b/src/datepicker/bs-datepicker-input.directive.ts index 4ae6021e19..15b0e968a1 100644 --- a/src/datepicker/bs-datepicker-input.directive.ts +++ b/src/datepicker/bs-datepicker-input.directive.ts @@ -1,11 +1,11 @@ import { ChangeDetectorRef, Directive, ElementRef, forwardRef, Host, Renderer2 } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { BsDatepickerDirective } from './bs-datepicker.component'; -import { formatDate } from '../bs-moment/format'; -import { getLocale } from '../bs-moment/locale/locales'; +import { formatDate } from '../chronos/format'; +import { getLocale } from '../chronos/locale/locales'; import { BsLocaleService } from './bs-locale.service'; import { BsDatepickerConfig } from './bs-datepicker.config'; -import { parseDate } from '../bs-moment/create/local'; +import { parseDate } from '../chronos/create/local'; const BS_DATEPICKER_VALUE_ACCESSOR = { provide: NG_VALUE_ACCESSOR, diff --git a/src/datepicker/bs-daterangepicker-input.directive.ts b/src/datepicker/bs-daterangepicker-input.directive.ts index 86476d7ab3..dc72f091f4 100644 --- a/src/datepicker/bs-daterangepicker-input.directive.ts +++ b/src/datepicker/bs-daterangepicker-input.directive.ts @@ -1,11 +1,11 @@ import { ChangeDetectorRef, Directive, ElementRef, forwardRef, Host, OnInit, Renderer2 } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; -import { formatDate } from '../bs-moment/format'; -import { getLocale } from '../bs-moment/locale/locales'; +import { formatDate } from '../chronos/format'; +import { getLocale } from '../chronos/locale/locales'; import { BsDaterangepickerDirective } from './bs-daterangepicker.component'; import { BsLocaleService } from './bs-locale.service'; import { BsDatepickerConfig } from './bs-datepicker.config'; -import { parseDate } from '../bs-moment/create/local'; +import { parseDate } from '../chronos/create/local'; const BS_DATERANGEPICKER_VALUE_ACCESSOR = { provide: NG_VALUE_ACCESSOR, diff --git a/src/datepicker/date-formatter.ts b/src/datepicker/date-formatter.ts index 08d8f466aa..a98816caea 100644 --- a/src/datepicker/date-formatter.ts +++ b/src/datepicker/date-formatter.ts @@ -1,4 +1,4 @@ -import { formatDate } from '../bs-moment/format'; +import { formatDate } from '../chronos/format'; export class DateFormatter { format(date: Date, format: string, locale: string): string { diff --git a/src/datepicker/engine/calc-days-calendar.ts b/src/datepicker/engine/calc-days-calendar.ts index 0bec10a8a7..2892be4c9c 100644 --- a/src/datepicker/engine/calc-days-calendar.ts +++ b/src/datepicker/engine/calc-days-calendar.ts @@ -2,7 +2,7 @@ // should accept some options // todo: split out formatting import { DaysCalendarModel, MonthViewOptions } from '../models/index'; -import { getFirstDayOfMonth } from '../../bs-moment/utils/date-getters'; +import { getFirstDayOfMonth } from '../../chronos/utils/date-getters'; import { getStartingDayOfCalendar } from '../utils/bs-calendar-utils'; import { createMatrix } from '../utils/matrix-utils'; diff --git a/src/datepicker/engine/flag-days-calendar.ts b/src/datepicker/engine/flag-days-calendar.ts index b9d1fd99b5..4b59c8dee8 100644 --- a/src/datepicker/engine/flag-days-calendar.ts +++ b/src/datepicker/engine/flag-days-calendar.ts @@ -3,11 +3,11 @@ import { DayViewModel, WeekViewModel } from '../models/index'; -import { isSameDay, isSameMonth } from '../../bs-moment/utils/date-getters'; -import { isAfter, isBefore } from '../../bs-moment/utils/date-compare'; +import { isSameDay, isSameMonth } from '../../chronos/utils/date-getters'; +import { isAfter, isBefore } from '../../chronos/utils/date-compare'; import { isMonthDisabled } from '../utils/bs-calendar-utils'; -import { shiftDate } from '../../bs-moment/utils/date-setters'; -import { endOf, startOf } from '../../bs-moment/utils/start-end-of'; +import { shiftDate } from '../../chronos/utils/date-setters'; +import { endOf, startOf } from '../../chronos/utils/start-end-of'; export interface FlagDaysCalendarOptions { isDisabled: boolean; diff --git a/src/datepicker/engine/flag-months-calendar.ts b/src/datepicker/engine/flag-months-calendar.ts index 3d0be12a15..9271f4f97a 100644 --- a/src/datepicker/engine/flag-months-calendar.ts +++ b/src/datepicker/engine/flag-months-calendar.ts @@ -1,10 +1,10 @@ -import { isSameMonth } from '../../bs-moment/utils/date-getters'; +import { isSameMonth } from '../../chronos/utils/date-getters'; import { MonthsCalendarViewModel, CalendarCellViewModel } from '../models/index'; import { isMonthDisabled, isYearDisabled } from '../utils/bs-calendar-utils'; -import { shiftDate } from '../../bs-moment/utils/date-setters'; +import { shiftDate } from '../../chronos/utils/date-setters'; export interface FlagMonthCalendarOptions { isDisabled: boolean; diff --git a/src/datepicker/engine/flag-years-calendar.ts b/src/datepicker/engine/flag-years-calendar.ts index 6e2829b282..ae46dfe27b 100644 --- a/src/datepicker/engine/flag-years-calendar.ts +++ b/src/datepicker/engine/flag-years-calendar.ts @@ -1,7 +1,7 @@ -import { isSameYear } from '../../bs-moment/utils/date-getters'; +import { isSameYear } from '../../chronos/utils/date-getters'; import { YearsCalendarViewModel, CalendarCellViewModel } from '../models/index'; import { isYearDisabled } from '../utils/bs-calendar-utils'; -import { shiftDate } from '../../bs-moment/utils/date-setters'; +import { shiftDate } from '../../chronos/utils/date-setters'; export interface FlagYearsCalendarOptions { isDisabled: boolean; diff --git a/src/datepicker/engine/format-days-calendar.ts b/src/datepicker/engine/format-days-calendar.ts index 69e4c43bc3..6a4ee95ac6 100644 --- a/src/datepicker/engine/format-days-calendar.ts +++ b/src/datepicker/engine/format-days-calendar.ts @@ -3,8 +3,8 @@ import { DaysCalendarModel, DaysCalendarViewModel } from '../models/index'; -import { formatDate } from '../../bs-moment/format'; -import { getLocale } from '../../bs-moment/locale/locales'; +import { formatDate } from '../../chronos/format'; +import { getLocale } from '../../chronos/locale/locales'; export function formatDaysCalendar(daysCalendar: DaysCalendarModel, formatOptions: DatepickerFormatOptions, diff --git a/src/datepicker/engine/format-months-calendar.ts b/src/datepicker/engine/format-months-calendar.ts index ce5155e028..7420cfe3a3 100644 --- a/src/datepicker/engine/format-months-calendar.ts +++ b/src/datepicker/engine/format-months-calendar.ts @@ -3,8 +3,8 @@ import { MonthsCalendarViewModel, CalendarCellViewModel } from '../models/index'; -import { startOf } from '../../bs-moment/utils/start-end-of'; -import { formatDate } from '../../bs-moment/format'; +import { startOf } from '../../chronos/utils/start-end-of'; +import { formatDate } from '../../chronos/format'; import { createMatrix } from '../utils/matrix-utils'; const height = 4; diff --git a/src/datepicker/engine/format-years-calendar.ts b/src/datepicker/engine/format-years-calendar.ts index 690bfc042c..2a263f4630 100644 --- a/src/datepicker/engine/format-years-calendar.ts +++ b/src/datepicker/engine/format-years-calendar.ts @@ -3,8 +3,8 @@ import { YearsCalendarViewModel, CalendarCellViewModel } from '../models/index'; -import { shiftDate } from '../../bs-moment/utils/date-setters'; -import { formatDate } from '../../bs-moment/format'; +import { shiftDate } from '../../chronos/utils/date-setters'; +import { formatDate } from '../../chronos/format'; import { createMatrix } from '../utils/matrix-utils'; const height = 4; diff --git a/src/datepicker/models/index.ts b/src/datepicker/models/index.ts index 4eb37e97d8..3b08151e35 100644 --- a/src/datepicker/models/index.ts +++ b/src/datepicker/models/index.ts @@ -1,4 +1,4 @@ -import { TimeUnit } from '../../bs-moment/types'; +import { TimeUnit } from '../../chronos/types'; export type BsDatepickerViewMode = 'day' | 'month' | 'year'; diff --git a/src/datepicker/reducer/bs-datepicker.actions.ts b/src/datepicker/reducer/bs-datepicker.actions.ts index 4d235826af..8c223bec19 100644 --- a/src/datepicker/reducer/bs-datepicker.actions.ts +++ b/src/datepicker/reducer/bs-datepicker.actions.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { TimeUnit } from '../../bs-moment/types'; +import { TimeUnit } from '../../chronos/types'; import { Action } from '../../mini-ngrx/index'; import { BsDatepickerViewMode, diff --git a/src/datepicker/reducer/bs-datepicker.effects.ts b/src/datepicker/reducer/bs-datepicker.effects.ts index 0e12222c0e..52330553c9 100644 --- a/src/datepicker/reducer/bs-datepicker.effects.ts +++ b/src/datepicker/reducer/bs-datepicker.effects.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import 'rxjs/add/operator/filter'; import 'rxjs/add/operator/map'; import { Observable } from 'rxjs/Observable'; -import { getFullYear, getMonth } from '../../bs-moment/utils/date-getters'; +import { getFullYear, getMonth } from '../../chronos/utils/date-getters'; import { BsDatepickerAbstractComponent } from '../base/bs-datepicker-container'; import { BsDatepickerConfig } from '../bs-datepicker.config'; import { diff --git a/src/datepicker/reducer/bs-datepicker.reducer.ts b/src/datepicker/reducer/bs-datepicker.reducer.ts index c6be8cc852..35d71d0fc8 100644 --- a/src/datepicker/reducer/bs-datepicker.reducer.ts +++ b/src/datepicker/reducer/bs-datepicker.reducer.ts @@ -5,17 +5,17 @@ import { BsDatepickerActions } from './bs-datepicker.actions'; import { calcDaysCalendar } from '../engine/calc-days-calendar'; import { formatDaysCalendar } from '../engine/format-days-calendar'; import { flagDaysCalendar } from '../engine/flag-days-calendar'; -import { setFullDate, shiftDate } from '../../bs-moment/utils/date-setters'; +import { setFullDate, shiftDate } from '../../chronos/utils/date-setters'; import { canSwitchMode } from '../engine/view-mode'; import { formatMonthsCalendar } from '../engine/format-months-calendar'; import { flagMonthsCalendar } from '../engine/flag-months-calendar'; import { formatYearsCalendar, yearsPerCalendar } from '../engine/format-years-calendar'; import { flagYearsCalendar } from '../engine/flag-years-calendar'; import { BsViewNavigationEvent, DatepickerFormatOptions } from '../models/index'; -import { isArray, isDateValid } from '../../bs-moment/utils/type-checks'; -import { startOf } from '../../bs-moment/utils/start-end-of'; -import { getLocale } from '../../bs-moment/locale/locales'; -import { isAfter, isBefore } from '../../bs-moment/utils/date-compare'; +import { isArray, isDateValid } from '../../chronos/utils/type-checks'; +import { startOf } from '../../chronos/utils/start-end-of'; +import { getLocale } from '../../chronos/locale/locales'; +import { isAfter, isBefore } from '../../chronos/utils/date-compare'; export function bsDatepickerReducer(state = initialDatepickerState, action: Action): BsDatepickerState { diff --git a/src/datepicker/utils/bs-calendar-utils.ts b/src/datepicker/utils/bs-calendar-utils.ts index c346bdd602..c6546a77d2 100644 --- a/src/datepicker/utils/bs-calendar-utils.ts +++ b/src/datepicker/utils/bs-calendar-utils.ts @@ -1,13 +1,13 @@ import { getDay, isFirstDayOfWeek -} from '../../bs-moment/utils/date-getters'; -import { shiftDate } from '../../bs-moment/utils/date-setters'; +} from '../../chronos/utils/date-getters'; +import { shiftDate } from '../../chronos/utils/date-setters'; import { isAfter, isBefore -} from '../../bs-moment/utils/date-compare'; -import { endOf, startOf } from '../../bs-moment/utils/start-end-of'; +} from '../../chronos/utils/date-compare'; +import { endOf, startOf } from '../../chronos/utils/start-end-of'; export function getStartingDayOfCalendar(date: Date, options: { firstDayOfWeek?: number }): Date { diff --git a/src/datepicker/utils/matrix-utils.ts b/src/datepicker/utils/matrix-utils.ts index 25885a7b62..de89acc3b6 100644 --- a/src/datepicker/utils/matrix-utils.ts +++ b/src/datepicker/utils/matrix-utils.ts @@ -1,5 +1,5 @@ -import { TimeUnit } from '../../bs-moment/types'; -import { shiftDate } from '../../bs-moment/utils/date-setters'; +import { TimeUnit } from '../../chronos/types'; +import { shiftDate } from '../../chronos/utils/date-setters'; export type CreateMatrixCb = (date: Date) => T; diff --git a/src/index.ts b/src/index.ts index fc0c6f8368..3d7895f8dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,7 +16,7 @@ import { TimepickerModule } from './timepicker/timepicker.module'; import { TooltipModule } from './tooltip/tooltip.module'; import { TypeaheadModule } from './typeahead/typeahead.module'; import { PopoverModule } from './popover/popover.module'; -export { listLocales } from './bs-moment/locale/locales'; +export { listLocales } from './chronos/locale/locales'; export { setTheme } from './utils/theme-provider'; export { @@ -153,30 +153,6 @@ export { positionElements } from './positioning/index'; -export { defineLocale, getSetGlobalLocale, LocaleData } from './bs-moment/index'; - -export { - ar, - cs, - de, - enGb, - es, - esDo, - esUs, - fr, - he, - hi, - hu, - it, - ja, - ko, - nl, - nlBe, - pl, - ptBr, - ru, - sv, - zhCn, - tr, - th -} from './locale'; +export { defineLocale, getSetGlobalLocale, LocaleData } from './chronos/index'; + +export * from './locale'; diff --git a/src/locale.ts b/src/locale.ts index d33f674fd8..053ce22e85 100644 --- a/src/locale.ts +++ b/src/locale.ts @@ -1,23 +1,23 @@ -export { ar } from './bs-moment/i18n/ar'; -export { cs } from './bs-moment/i18n/cs'; -export { de } from './bs-moment/i18n/de'; -export { enGb } from './bs-moment/i18n/en-gb'; -export { es } from './bs-moment/i18n/es'; -export { esDo } from './bs-moment/i18n/es-do'; -export { esUs } from './bs-moment/i18n/es-us'; -export { fr } from './bs-moment/i18n/fr'; -export { hi } from './bs-moment/i18n/hi'; -export { hu } from './bs-moment/i18n/hu'; -export { it } from './bs-moment/i18n/it'; -export { ja } from './bs-moment/i18n/ja'; -export { ko } from './bs-moment/i18n/ko'; -export { nl } from './bs-moment/i18n/nl'; -export { nlBe } from './bs-moment/i18n/nl-be'; -export { pl } from './bs-moment/i18n/pl'; -export { ptBr } from './bs-moment/i18n/pt-br'; -export { sv } from './bs-moment/i18n/sv'; -export { ru } from './bs-moment/i18n/ru'; -export { zhCn } from './bs-moment/i18n/zh-cn'; -export { tr } from './bs-moment/i18n/tr'; -export { he } from './bs-moment/i18n/he'; -export { th } from './bs-moment/i18n/th'; \ No newline at end of file +export { arLocale } from './chronos/i18n/ar'; +export { csLocale } from './chronos/i18n/cs'; +export { deLocale } from './chronos/i18n/de'; +export { enGbLocale } from './chronos/i18n/en-gb'; +export { esLocale } from './chronos/i18n/es'; +export { esDoLocale } from './chronos/i18n/es-do'; +export { esUsLocale } from './chronos/i18n/es-us'; +export { frLocale } from './chronos/i18n/fr'; +export { hiLocale } from './chronos/i18n/hi'; +export { huLocale } from './chronos/i18n/hu'; +export { itLocale } from './chronos/i18n/it'; +export { jaLocale } from './chronos/i18n/ja'; +export { koLocale } from './chronos/i18n/ko'; +export { nlLocale } from './chronos/i18n/nl'; +export { nlBeLocale } from './chronos/i18n/nl-be'; +export { plLocale } from './chronos/i18n/pl'; +export { ptBrLocale } from './chronos/i18n/pt-br'; +export { svLocale } from './chronos/i18n/sv'; +export { ruLocale } from './chronos/i18n/ru'; +export { zhCnLocale } from './chronos/i18n/zh-cn'; +export { trLocale } from './chronos/i18n/tr'; +export { heLocale } from './chronos/i18n/he'; +export { thLocale } from './chronos/i18n/th';