]>
git.ipfire.org Git - thirdparty/moment.git/log
Iskren Chernev [Sat, 25 Apr 2020 18:00:43 +0000 (21:00 +0300)]
[misc] Fix ts3.1 tests, reenable them in pipeline
Iskren Chernev [Fri, 24 Apr 2020 21:10:17 +0000 (00:10 +0300)]
Merge pull request #4883 from OjasM:develop
[bugfix] Invalid duration gets valid when wrapping/cloning (#4323)
Ojas [Wed, 5 Dec 2018 06:55:36 +0000 (12:25 +0530)]
[bugfix] Clone/wrapper of invalid duration should be invalid (#4323)
Iskren Chernev [Fri, 24 Apr 2020 20:57:40 +0000 (23:57 +0300)]
Merge pull request #4910 from nanomosfet:add-weeks-to-relative
[feature] Add week as unit for relative time calc
Iskren Chernev [Fri, 24 Apr 2020 20:57:14 +0000 (23:57 +0300)]
Add week relative time threshold
Tim [Thu, 13 Dec 2018 07:11:29 +0000 (23:11 -0800)]
[feature] Add week as possible relative time unit
Iskren Chernev [Fri, 24 Apr 2020 20:35:40 +0000 (23:35 +0300)]
Merge pull request #5133 from brgrz:develop
[locale] sl: Fix date format
Marko Hrovatic [Wed, 5 Jun 2019 09:05:21 +0000 (11:05 +0200)]
[locale] sl: Improve date format
Colin Dean [Fri, 24 Apr 2020 20:14:43 +0000 (16:14 -0400)]
[locale] eo: Multiple corrections (#5457)
* [locale] eo: Fixes some expressions
Line 12: adding the letter "t" for the months "marto" and "septembro" to distinguish them from "mardo" (=tuesday) and "sep" (=seven)
Lines 20, 21, 22, 38 and 40: correction of some date expressions in which accusative is needed.
Line 46: adding the word "kelkaj" (=some), because "post sekundoj" and "antaŭ sekundoj" don't really make sense.
Lines 48, 50, 52, 54 and 56: adding the word "unu" (=one) because it's about the quantity "1", and not about an indefinite thing.
* [locale] eo: Fixes tests to match new expressions
Adding the letter "t" for the months "marto" and "septembro" to distinguish them from "mardo" (=tuesday) and "sep" (=seven)
Correction of some expressions in which accusative is needed.
Adding the word "kelkaj" (=some), because "post sekundoj" and "antaŭ sekundoj" don't really make sense.
Adding the word "unu" (=one) because it's about the quantity "1", and not about an indefinite thing introduced by the article a/an.
* [locale] eo: Fixes some typos in tests
* [locale] eo: Drops accusative -n from short day name in llll format
Co-authored-by: Vivakvo <ybachimont@esperanto.org>
Kafil [Fri, 24 Apr 2020 19:40:31 +0000 (19:40 +0000)]
[locale] ar-ma: Fix a typo in monday (#5427)
Iskren Chernev [Fri, 24 Apr 2020 18:55:42 +0000 (21:55 +0300)]
Revert "[locale] sk: Improve future tense (#5206)"
This reverts commit
2e3388171450f39ed4799123737f7aed4addec8e .
Based on https://github.com/moment/moment/pull/5409#issuecomment-
618482801
Per Enström [Fri, 24 Apr 2020 18:47:11 +0000 (20:47 +0200)]
[locale] sv: Improve ordinals (#5445)
* [locale] Correct Swedish ordinals
Moment is currently formatting Swedish ordinals incorrectly. Added colon between number and ordinal character.
Sources:
* https://learningswedish.se/courses/1/pages/ordinal-numbers
* http://swedishbitz.com/ordinal-numbers/
* Update Swedish ordinal tests
* Revert "[locale] Correct Swedish ordinals"
This reverts commit
f5aa499d75effd5153b571fd616633f7a9e715cd .
* Update swedish ordinals, in correct file
Iskren Chernev [Fri, 24 Apr 2020 18:44:36 +0000 (21:44 +0300)]
Merge pull request #5411 from rodoch:develop
[locale] ga: Improve month/weekday strings
Ronan Doherty [Mon, 16 Mar 2020 12:53:29 +0000 (12:53 +0000)]
[locale] ga: Improve month/weekday strings
Emanuel Cepoi [Fri, 24 Apr 2020 18:31:03 +0000 (21:31 +0300)]
[locale] ro: Improve Feb translation (#5387)
Tan Yuanhong [Fri, 24 Apr 2020 18:28:35 +0000 (02:28 +0800)]
[new locale] zh-mo: Chinese (Macau) (#5356)
* Add locale support for zh-mo
* Update zh-mo.js
Iskren Chernev [Fri, 24 Apr 2020 18:24:27 +0000 (21:24 +0300)]
[new locale] en-in: English (India)
Irakli Janiashvili [Fri, 24 Apr 2020 18:17:22 +0000 (22:17 +0400)]
[locale] ka: Standalone/format/longformat improvements (#5279)
* Fixed typo in the Georgian locale
* fixed month formatting
* removed am/pm from longDateFormat
* fix ka locale tests
* updated author username
Andrej Rypo [Fri, 24 Apr 2020 18:14:26 +0000 (20:14 +0200)]
[locale] sk: Improve future tense (#5206)
"Za" is commonly (and _incorrectly_) used to relatively refer to a moment in the future. This error is mainly influenced by Czech language, which is very similar and most Slovaks will understand it, many times domesticating phrases from Czech language. In Czech, "za" is used, though in Slovak, "o" must be used.
Here are references to both "za" and "o" in the official dictionary of Slovak language:
https://slovnik.juls.savba.sk/?w=o&s=exact&d=kssj4
https://slovnik.juls.savba.sk/?w=za&s=exact&d=kssj4
And here is a more readable unofficial explanation: https://www.pravopisne.sk/o-hodinu-x-za-hodinu/
Iskren Chernev [Fri, 24 Apr 2020 18:11:03 +0000 (21:11 +0300)]
Merge pull request #5269 from vdmtrv:fix/locale-require
[bugfix] Use __dirname for locale import if available
Ventsislav Dimitrov [Fri, 25 Oct 2019 17:29:17 +0000 (18:29 +0100)]
[bugfix] Use __dirname for locale import if available
React native doesn't like relative require calls. So use __dirname and
replace relative requires with absolute ones. Fall back to relative
require if __dirname is not present (for whatever reason).
Fixes #5252 and #5214
Iskren Chernev [Fri, 24 Apr 2020 18:02:12 +0000 (21:02 +0300)]
Merge pull request #5340 from howel52:fix-packageJSNext
[misc] Add module in addition to jsnext:main in package.json
howel [Sun, 5 Jan 2020 17:56:17 +0000 (01:56 +0800)]
[misc] Add module in addition to jsnext:main in package.json
Iskren Chernev [Fri, 24 Apr 2020 17:57:15 +0000 (20:57 +0300)]
Merge pull request #5331 from dimichgh:develop
[misc] Cache loadLocale failures to reduce FS ops
Iskren Chernev [Fri, 24 Apr 2020 17:56:41 +0000 (20:56 +0300)]
[benchmark] Load a missing locale
dsemenov [Mon, 30 Dec 2019 01:55:35 +0000 (17:55 -0800)]
[perf] Cache loadLocale misses to avoid FS ops
Iskren Chernev [Fri, 24 Apr 2020 17:42:20 +0000 (20:42 +0300)]
Merge pull request #5310 from StoyanDimitrov:patch-1
[locale] bg: Improve cardinal nouns
StoyanDimitrov [Wed, 4 Dec 2019 20:18:57 +0000 (20:18 +0000)]
Update bg.js
The required tests
StoyanDimitrov [Wed, 4 Dec 2019 20:03:47 +0000 (20:03 +0000)]
[locale] Update bg.js
Fixed cardinal noun. Sigh…
Iskren Chernev [Fri, 24 Apr 2020 17:38:24 +0000 (20:38 +0300)]
Merge pull request #5294 from harkue:develop
[pkg] Enable source maps for minified artefacts
harkue [Sat, 16 Nov 2019 06:37:04 +0000 (14:37 +0800)]
[misc] Add `sourceMap` when uglifying
Iskren Chernev [Fri, 24 Apr 2020 17:33:21 +0000 (20:33 +0300)]
Merge pull request #5303 from Neob91:fix/add-tests-for-2020-leap-year-bug
[tests] Add tests for string year + leap bug
Andrzej Bartosiński [Sun, 1 Dec 2019 16:38:58 +0000 (17:38 +0100)]
Add tests for updating last day of february on a leap year to 2020 provided as string
Iskren Chernev [Fri, 24 Apr 2020 17:30:43 +0000 (20:30 +0300)]
Merge pull request #5261 from eliedrian:2020-leap-year-fix
[bugfix] Fix string year setter + leap
The computation for leap year wants an integer, and passing a string messes
that up. Other than that js Date handles string no-problem.
Eli Edrian Tan [Thu, 17 Oct 2019 06:39:47 +0000 (14:39 +0800)]
Cast year input to int
Iskren Chernev [Fri, 24 Apr 2020 15:36:16 +0000 (18:36 +0300)]
Merge pull request #5064 from mariomc:fixLocaleInheritance
[bugfix] Long date format was interpolating characters inside brackets
Mário Gonçalves [Fri, 5 Apr 2019 11:40:33 +0000 (12:40 +0100)]
Fix long date format inheritance interpolating characters inside square brackets
Iskren Chernev [Fri, 24 Apr 2020 15:22:23 +0000 (18:22 +0300)]
Merge pull request #5029 from bluelovers:pr/002
[misc] Fix nodejs complaining about inspect
bluelovers [Thu, 7 Mar 2019 14:48:38 +0000 (22:48 +0800)]
[bugfix] Make nodejs util inspect happy
Newer versions of nodejs use a special symbol for inspecting a value
instead of the old-school obj.inspect function.
Iskren Chernev [Fri, 24 Apr 2020 14:47:44 +0000 (17:47 +0300)]
Merge branch 'pr_4809' into develop
Kilian Cirera Sant [Fri, 12 Oct 2018 20:36:50 +0000 (13:36 -0700)]
Export unitOfTime namespace
This allows developers to annotate variables as units of time.
Example:
```typescript
let unitOfTime: moment.unitOfTime.DurationConstructor = 'd';
// Here some code that might change unitOfTime
// ...
// TypeScript can make sure `unitOfTime` will have a valid value.
moment().add(x, unitOfTime);
```
Tremayne Christ [Fri, 24 Apr 2020 11:41:32 +0000 (12:41 +0100)]
[bugfix] Fix circular dependency issue (#4906)
* split out isLeapYear into separate util
* update month to use isLeapYear util for consistency
Ash [Fri, 24 Apr 2020 11:40:00 +0000 (12:40 +0100)]
[bugfix] Ignore enumerable Object.prototype extensions (#4953)
* [bugfix] Ignore enumerable Object.prototype extensions
* Waste time with jshint
* Waste time with jscs
Co-authored-by: Iskren Ivov Chernev <iskren.chernev@gmail.com>
tomerle [Fri, 24 Apr 2020 11:30:44 +0000 (14:30 +0300)]
[misc] Add general benchmarks: get, set, compare (#2659) (#4963)
Add grunt benchmark sub tasks: get, set, endOf, startOf, compare
Add grunt benchmark sub task for running all: all
Naoko Takano [Fri, 24 Apr 2020 11:28:25 +0000 (20:28 +0900)]
Revert "[locale] ja: fix long month names (#4590)" (#4991)
This reverts commit
cf30706573f537b904fd7ee8bf78f8576a45a87e .
Iskren Chernev [Fri, 24 Apr 2020 11:25:04 +0000 (14:25 +0300)]
Disable TS3 tests for now
Petar Petrov [Fri, 24 Apr 2020 11:23:12 +0000 (14:23 +0300)]
[locale] Tweak bg translation for last week (#5006)
* Tweak bg translation for last week
The current translation adds a very specific and mostly unnecessary 'at' in the beginning. It just looks/sounds wrong. Maybe there are cases when this might be correct but surely not most of the time. [insert 'change my mind' meme]
* move bg changes to proper files
Klemensas [Fri, 24 Apr 2020 11:21:34 +0000 (14:21 +0300)]
[bugfix] ts: Add isoWeek option for duration constructor (fix #5007) (#5008)
sm2017 [Fri, 24 Apr 2020 11:17:42 +0000 (15:47 +0430)]
[locale] fa: Fix typo (#5013)
WikiDiscoverer [Fri, 24 Apr 2020 10:40:41 +0000 (16:10 +0530)]
[locale] gom-latn: Improve processRelativeTime (#5069)
* Correct processRelativeTime
The function processRelativeTime should check whether the time is in the future, and not whether there is a suffix
* Correct processRelativeTime
Updated tests based on the change in the function processRelativeTime
chrisbucholz [Fri, 24 Apr 2020 10:35:57 +0000 (03:35 -0700)]
[bugfix] Invalid parse against array still picks best format (fixes #4435) (#5080)
Josh Nelsson-Smith [Thu, 23 Apr 2020 20:50:28 +0000 (06:50 +1000)]
[bugfix] Uniform handling of day/date when 0 is used (#5098)
Iskren Chernev [Thu, 23 Apr 2020 20:17:27 +0000 (23:17 +0300)]
Merge branch 'pr_5151' into develop
Max Burmagin [Sun, 23 Jun 2019 12:25:26 +0000 (15:25 +0300)]
fix grunt task for ts3.1 tests
Max Burmagin [Sat, 22 Jun 2019 17:54:23 +0000 (20:54 +0300)]
introduce typescript typesversions
Roan Kattouw [Thu, 23 Apr 2020 20:08:07 +0000 (13:08 -0700)]
[locale] hr: Fix month declension in Croation LL, LLL, LLLL formats (#5152)
Months should be in the accusative case in these formats, but they are
returned in the nominative case. This is because these formats hard-code
the dot after the day ("D.") rather than using ordinal notation ("Do").
The regex for detecting accusative case matches "Do" but not "D.".
Many other locales have the same problem, with L* formats using "D."
where "Do" should be used instead, but none of them have different
grammatical forms for months, so nothing breaks for them. Croatian is
the only one where "D." causes this bug.
Downstream bug report from Wikipedia: https://phabricator.wikimedia.org/T223988
Caio Shimada Rabello [Thu, 23 Apr 2020 20:06:34 +0000 (17:06 -0300)]
[locale] pt,pt-br: Uncapitalization of month names (#5158)
Anthony Lau [Thu, 23 Apr 2020 20:04:33 +0000 (04:04 +0800)]
[locale] zh-hk: Update meridiem hour range (#5160)
Stephen Ramthun [Thu, 23 Apr 2020 20:03:19 +0000 (22:03 +0200)]
[locale] nb,nn: use correct abbreviations for months and weekdays (#5165)
Alex Werner [Thu, 23 Apr 2020 19:59:02 +0000 (21:59 +0200)]
[bugfix] Fixing isFunction when Function is undefined (#5174)
Preventing any `Uncaught ReferenceError: Function is not defined` error as per suggested in PR thread.
Ash [Thu, 23 Apr 2020 19:50:07 +0000 (20:50 +0100)]
Fix #4995: typo in Bulgarian abbreviation for January (#5203)
Michael Gwynne [Thu, 23 Apr 2020 19:48:28 +0000 (20:48 +0100)]
[misc] Update moment URL to https (#5204)
Ash [Thu, 23 Apr 2020 19:12:05 +0000 (20:12 +0100)]
[bugfix] Support unusual historic timezone offsets (fixes #5236) (#5237)
Rafael de Melo Silva [Thu, 23 Apr 2020 19:05:46 +0000 (16:05 -0300)]
[locale] tet: Fix seconds translation
Pedro Luiz Cabral Salomon Prado [Thu, 23 Apr 2020 19:04:27 +0000 (16:04 -0300)]
[misc] Remove unused imports (#5260)
Iskren Chernev [Thu, 23 Apr 2020 18:12:06 +0000 (21:12 +0300)]
Do not run tests twice in travis
Iskren Chernev [Thu, 23 Apr 2020 18:05:44 +0000 (21:05 +0300)]
Update node versions in travis.yml
Iskren Chernev [Thu, 23 Apr 2020 17:59:55 +0000 (20:59 +0300)]
Update some deps
Iskren Chernev [Thu, 23 Apr 2020 16:43:06 +0000 (19:43 +0300)]
Export QUnit.only
Iskren Chernev [Thu, 23 Apr 2020 16:42:33 +0000 (19:42 +0300)]
Fix weird test issue
Cameron Chamberlain [Thu, 23 Apr 2020 16:07:27 +0000 (02:07 +1000)]
[misc] Remove stray second arg from `parseFloat` (#5277)
Looks like someone was thinking of parseInt which takes a `radix` param.
In parseFloat there should be one argument only.
Terrence Wong [Thu, 23 Apr 2020 15:04:18 +0000 (23:04 +0800)]
[bugfix] moment#5327 output wrong next week in ja locale (#5329)
* Fix moment#5327 output wrong next week string when in last week of the year in ja locale
* Fix moment#5327 output wrong next week string when in next week of the year in ja locale
HYUNSANG HAN [Thu, 23 Apr 2020 14:26:31 +0000 (23:26 +0900)]
[locale] (en-li) Support ss (#5399)
HYUNSANG HAN [Thu, 23 Apr 2020 14:25:03 +0000 (23:25 +0900)]
[tests] Fix the humanize test message (#5400)
Alan Wang [Thu, 23 Apr 2020 13:52:53 +0000 (21:52 +0800)]
[misc] add FAQ.md (#5452)
Add FAQ addressing some typescript related problems. More to be added in the future.
Golam Rabbani [Mon, 10 Jun 2019 08:05:56 +0000 (14:05 +0600)]
[locale] bn: Improve translation as per Bangla Academy (#5055)
Jean-Baptiste Le Duigou [Mon, 10 Jun 2019 08:03:33 +0000 (10:03 +0200)]
[locale] (br) Breton move from 12-hour to 24-hour notation (#4975)
* Breton : move from 12-hour to 24-hour notation #4974 https://github.com/moment/moment/issues/4974
* Replace [e] by :
André Silva [Mon, 10 Jun 2019 07:59:27 +0000 (08:59 +0100)]
[locale] typos in Irish locale for months (#5127)
Fixed some typos in the Irish locale regarding months.
Francesco Novy [Tue, 7 May 2019 07:38:48 +0000 (09:38 +0200)]
[locale] (en-sg) Rename locale en-SG to en-sg (#5025)
Chien Kira [Mon, 11 Mar 2019 05:06:09 +0000 (14:06 +0900)]
[locale] correct translation of locale for Vietnam (#4874)
* correct translation of locale for Vietnam
* correct translation of locale for Vietnam (edit proper src files)
* Update author comment line
Vinay Date [Mon, 11 Feb 2019 22:57:06 +0000 (04:27 +0530)]
[locale] mr (Marathi) (#4990)
* tests according to changes in mr.js
* [locale] mr (Marathi)
We Marathi people follow standards mentioned below, to label timespans.
Label | Time Span
------------ | -------------
पहाटे (post midnight, pre-sunrise) | >= 12am to < 6am
सकाळी (post sunrise, pre-noon) | >= 6am to < 12pm
दुपारी (afternoon) | >= 12pm to < 5pm
सायंकाळी (evening) | >= 5pm to < 8pm
रात्री (night) | >= 8pm to < 12am
Actually, 12am is confusing in Marathi tradition. In modern clock system, Moment 12am is considered in arriving date as 0am. And in Marathi tradition it is referred to as final moment of the previous date (Sort of, 0:01 is starting minute of the arriving date) . To comply with modern clock system, I propose to refer to 0am as पहाटे , so that it is considered as moment in the arriving date. Hope this discription itself is not confusing :)
Another point is about range of पहाटे, ie. >= 0am to < 6am. Though conventionally, upto 2 am, we refer to the time as रात्री or पहाटे, both alternatively, I want to specifically call पहाटे for early times in the arriving date and रात्री for late times in the departing date, to make it more specific and well-defined, avoiding confusion about date of the time.
Phil Davis [Sat, 2 Feb 2019 07:17:19 +0000 (13:02 +0545)]
[tests] Fix various text typos (#4976)
Sashko Todorov [Sun, 27 Jan 2019 19:28:47 +0000 (20:28 +0100)]
[locale] improve mk translation (#4958)
* Update mk.js
* Update mk.js
* Update mk.js
* Update mk.js
* [locale] improve mk translation
Kunal Marwaha [Thu, 24 Jan 2019 07:39:48 +0000 (23:39 -0800)]
[locale] es: Add es translation for invalidDate (#4560)
* Add es translation for invalidDate
* Fix lint
Ash [Wed, 23 Jan 2019 00:45:21 +0000 (00:45 +0000)]
[bugfix] Fix #4962 updateLocale with null to reset (#4966)
Kunal Marwaha [Wed, 23 Jan 2019 00:41:41 +0000 (16:41 -0800)]
[new locale] (oc-lnc) Occitan (#4957)
* Add oc-lnc files
* Fix calendar test
* Fix the rest of tests
* Add locale author
* Dont make changes to package-lock
* Add newline at end of file
Gilly Barr [Tue, 22 Jan 2019 02:37:26 +0000 (04:37 +0200)]
[misc] Fix type of WeekSpec (#4634)
* Fix "the the" typo in test (#4578)
* [locale] Fix #4568: Insert punjabi for "next" (#4583)
* Fix type of WeekSpec
You can set `dow` without setting `doy`, so the type should reflect that
Kunal Marwaha [Mon, 21 Jan 2019 21:22:22 +0000 (13:22 -0800)]
[misc] release process fixes (#4961)
* Fix locale abbreviation in comment
* Update package-lock.json
Kunal Marwaha [Mon, 21 Jan 2019 20:59:53 +0000 (12:59 -0800)]
Build 2.24.0
Kunal Marwaha [Mon, 21 Jan 2019 20:58:37 +0000 (12:58 -0800)]
Bump version to 2.24.0
Kunal Marwaha [Mon, 21 Jan 2019 20:57:09 +0000 (12:57 -0800)]
Update changelog for 2.24.0
Kristian Sakarisson [Mon, 21 Jan 2019 20:36:47 +0000 (22:36 +0200)]
[locale] fo: Fixed relativeTimes for m and M (#4609) (#4682)
* [locale] fo: Fixed relativeTimes for m and M (#4609)
* Add new Faroese locale author
* Revert locale/* edit from commit
b51d421 .
Ronny Roeller [Mon, 21 Jan 2019 20:35:24 +0000 (21:35 +0100)]
[misc] Remove unused variable defaults (#4959)
The default values of the initialized fields are overwritten in the following lines. This means that the code never relies on the variable defaults.
Removing the unused defaults makes the code easier to read.
Libor Nenadál [Mon, 21 Jan 2019 05:57:00 +0000 (06:57 +0100)]
[locale] Extend cs locale with name of the months in genitive (#4771)
Kunal Marwaha [Mon, 21 Jan 2019 05:48:12 +0000 (21:48 -0800)]
[feature] Add localeSort param to Locale weekday methods (#4553)
* Add localeSort param to Locale weekday methods
* Add concrete test case
Kunal Marwaha [Sun, 20 Jan 2019 21:23:20 +0000 (13:23 -0800)]
[locale] (es-us) long date is D [de] MMMM [de] YYYY (#4954)
Shiwani [Sat, 19 Jan 2019 02:38:58 +0000 (08:08 +0530)]
[bugfix] (TypeScript) allow update of a single relativeTime handler
Cassiano Montanari [Sat, 19 Jan 2019 02:30:42 +0000 (00:30 -0200)]
[locale] Capitalization of pt month names (#4557)
* Updated pt-br tests
* Update pt-br.js
* Update pt-br.js
* Updated PT tests
* Updated pt-js month names capitalization
Cassiano Montanari [Sat, 19 Jan 2019 02:25:10 +0000 (00:25 -0200)]
[locale] Capitalization pt-br month names and tests (#4558)
* Updated capitalization of months
* Updated capitalization of month names
Takuya Sawada [Sat, 19 Jan 2019 02:11:07 +0000 (11:11 +0900)]
[locale] ja: fix long month names (#4590)
* Fix "the the" typo in test (#4578)
* [locale] ja: fix long month names