javascript-time-ago 2.5.4 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -181,7 +181,7 @@ timeAgo.format(Date.now() - 1.5 * 60 * 1000, 'round')
|
|
|
181
181
|
* 1 hour ago
|
|
182
182
|
* 2 hours ago
|
|
183
183
|
* …
|
|
184
|
-
*
|
|
184
|
+
* 23 hours ago
|
|
185
185
|
* 1 day ago
|
|
186
186
|
* 2 days ago
|
|
187
187
|
* …
|
|
@@ -938,4 +938,4 @@ On March 9th, 2020, GitHub, Inc. silently [banned](https://medium.com/@catamphet
|
|
|
938
938
|
|
|
939
939
|
## License
|
|
940
940
|
|
|
941
|
-
[MIT](LICENSE)
|
|
941
|
+
[MIT](LICENSE)
|
package/index.d.ts
CHANGED
|
@@ -126,8 +126,8 @@ export default class TimeAgo {
|
|
|
126
126
|
// Perhaps it's not the best solution, and it would be better to introduce a new function called
|
|
127
127
|
// `.formatAndGetTimeToNextUpdate()`. But at this stage that would require a "major" version number update,
|
|
128
128
|
// and I wouldn't prefer doing that for such an insignificant change.
|
|
129
|
-
format(date: DateInput, style?: FormatStyleName | Style, options?: FormatOptions):
|
|
130
|
-
format(date: DateInput, options: FormatOptions):
|
|
129
|
+
format(date: DateInput, style?: FormatStyleName | Style, options?: FormatOptions): FormatOptions['getTimeToNextUpdate'] extends true ? [string, number?] : string;
|
|
130
|
+
format(date: DateInput, options: FormatOptions): FormatOptions['getTimeToNextUpdate'] extends true ? [string, number?] : string;
|
|
131
131
|
getLabels(labelsType: LabelStyleName | LabelStyleName[]): Labels;
|
|
132
132
|
static addLocale(localeData: LocaleData): void;
|
|
133
133
|
static addDefaultLocale(localeData: LocaleData): void;
|