Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

round years using calendar years only #271

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

keithamus
Copy link
Member

Fixes #270

This uses calendar math for differences with a larger precision than 27 days.

@keithamus keithamus requested a review from a team as a code owner January 12, 2024 13:44
@keithamus keithamus force-pushed the round-years-using-calendar-years-only branch 3 times, most recently from 0c41675 to 7c52050 Compare January 12, 2024 13:50
@keithamus keithamus force-pushed the round-years-using-calendar-years-only branch from 7c52050 to afdd4ea Compare January 12, 2024 14:12
@keithamus keithamus merged commit 7e40806 into main Jan 16, 2024
1 check passed
@keithamus keithamus deleted the round-years-using-calendar-years-only branch January 16, 2024 17:48
hogo6002 pushed a commit to google/osv.dev that referenced this pull request Feb 26, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
| | | lockFileMaintenance | All locks refreshed |
[![age](https://developer.mend.io/api/mc/badges/age///?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption///?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility////?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence////?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@github/relative-time-element](https://togithub.com/github/relative-time-element)
| dependencies | patch | [`4.3.0` ->
`4.3.1`](https://renovatebot.com/diffs/npm/@github%2frelative-time-element/4.3.0/4.3.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@github%2frelative-time-element/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@github%2frelative-time-element/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@github%2frelative-time-element/4.3.0/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@github%2frelative-time-element/4.3.0/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [css-loader](https://togithub.com/webpack-contrib/css-loader) |
devDependencies | minor | [`6.9.0` ->
`6.10.0`](https://renovatebot.com/diffs/npm/css-loader/6.9.0/6.10.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/css-loader/6.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/css-loader/6.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/css-loader/6.9.0/6.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/css-loader/6.9.0/6.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[mini-css-extract-plugin](https://togithub.com/webpack-contrib/mini-css-extract-plugin)
| devDependencies | minor | [`2.7.6` ->
`2.8.0`](https://renovatebot.com/diffs/npm/mini-css-extract-plugin/2.7.6/2.8.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/mini-css-extract-plugin/2.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mini-css-extract-plugin/2.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mini-css-extract-plugin/2.7.6/2.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mini-css-extract-plugin/2.7.6/2.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [sass](https://togithub.com/sass/dart-sass) | devDependencies | minor
| [`1.69.7` ->
`1.71.1`](https://renovatebot.com/diffs/npm/sass/1.69.7/1.71.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/sass/1.71.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/sass/1.71.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/sass/1.69.7/1.71.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/sass/1.69.7/1.71.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [webpack](https://togithub.com/webpack/webpack) | devDependencies |
minor | [`5.89.0` ->
`5.90.3`](https://renovatebot.com/diffs/npm/webpack/5.89.0/5.90.3) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/webpack/5.90.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/webpack/5.90.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/webpack/5.89.0/5.90.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/webpack/5.89.0/5.90.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>github/relative-time-element
(@&#8203;github/relative-time-element)</summary>

###
[`v4.3.1`](https://togithub.com/github/relative-time-element/releases/tag/v4.3.1)

[Compare
Source](https://togithub.com/github/relative-time-element/compare/v4.3.0...v4.3.1)

#### What's Changed

- Fixing typos by [@&#8203;deining](https://togithub.com/deining) in
[github/relative-time-element#264
- Bump word-wrap from 1.2.3 to 1.2.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/relative-time-element#265
- round years using calendar years only by
[@&#8203;keithamus](https://togithub.com/keithamus) in
[github/relative-time-element#271

#### New Contributors

- [@&#8203;deining](https://togithub.com/deining) made their first
contribution in
[github/relative-time-element#264

**Full Changelog**:
github/relative-time-element@v4.3.0...v4.3.1

</details>

<details>
<summary>webpack-contrib/css-loader (css-loader)</summary>

###
[`v6.10.0`](https://togithub.com/webpack-contrib/css-loader/blob/HEAD/CHANGELOG.md#6100-2024-01-30)

[Compare
Source](https://togithub.com/webpack-contrib/css-loader/compare/v6.9.1...v6.10.0)

##### Features

- add `@rspack/core` as an optional peer dependency
([#&#8203;1568](https://togithub.com/webpack-contrib/css-loader/issues/1568))
([3924679](https://togithub.com/webpack-contrib/css-loader/commit/3924679cb9a8f31996c742290a71a3446c9782b9))
- pass the `resourceQuery` and `resourceFragment` to the `auto` and
`mode` callback
([#&#8203;1569](https://togithub.com/webpack-contrib/css-loader/issues/1569))
([d641c4d](https://togithub.com/webpack-contrib/css-loader/commit/d641c4d48264518dfeb77d7e1e8ef03bbb09b645))
- support named exports with any characters
([6f43929](https://togithub.com/webpack-contrib/css-loader/commit/6f439299838eab7e6fb18f6e9f47b9dee2208463))

#####
[6.9.1](https://togithub.com/webpack-contrib/css-loader/compare/v6.9.0...v6.9.1)
(2024-01-18)

##### Bug Fixes

-   css nesting support
-   `@scope` at-rule support

###
[`v6.9.1`](https://togithub.com/webpack-contrib/css-loader/blob/HEAD/CHANGELOG.md#691-2024-01-18)

[Compare
Source](https://togithub.com/webpack-contrib/css-loader/compare/v6.9.0...v6.9.1)

</details>

<details>
<summary>webpack-contrib/mini-css-extract-plugin
(mini-css-extract-plugin)</summary>

###
[`v2.8.0`](https://togithub.com/webpack-contrib/mini-css-extract-plugin/blob/HEAD/CHANGELOG.md#280-2024-02-01)

[Compare
Source](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.7...v2.8.0)

##### Features

- added the `beforeTagInsert` hook
([#&#8203;1054](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1054))
([6313bf6](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/6313bf629c1c76ec7b07dc60fef06e39702a63d9))
- support named exports with any characters
([b656c5c](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/b656c5c98dcffcae51f5208e961ce089be6607a8))

#####
[2.7.7](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.6...v2.7.7)
(2024-01-10)

##### Bug Fixes

- add ';' to import media queries
([#&#8203;1051](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1051))
([98acf2b](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/98acf2bbd08ba0988318c6d364b9aa14f84ed79a))
- add `ChunkLoadError` name to chunk loading error
([#&#8203;1073](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1073))
([e3f8375](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/e3f837574bdad9dc583028c6f9a9a2f3082d9ecb))
- adding media, supports and layer for external import
([#&#8203;1072](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1072))
([60c5331](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/60c53311c125425d2e742414ed6dbd59cea8cbe4))
- css experiment detection
([#&#8203;1067](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1067))
([82f4a47](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/82f4a47f3ddc7cdbba311bee50d85dd4b3e6bfb1))

#####
[2.7.6](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.5...v2.7.6)
(2023-05-19)

##### Bug Fixes

- compatibility with built-in CSS support
([#&#8203;1035](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1035))
([f576ed6](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/f576ed6a530db555d7442ebab1f9a09f3acff13f))

#####
[2.7.5](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.4...v2.7.5)
(2023-03-16)

##### Bug Fixes

- don't invalidate cache after timeout refresh
([#&#8203;1023](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1023))
([38d8513](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/38d8513f97983698b3b4417abb8bacaee0ea68fb))
- readable identifier
([#&#8203;1024](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1024))
([721bbf1](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/721bbf104030c96acff14ad2b7a23edc4f1e277d))

#####
[2.7.4](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.3...v2.7.4)
(2023-03-16)

##### Bug Fixes

- module identifier, don't merge modules with different
media/suppors/layer
([#&#8203;1021](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1021))
([ad3729b](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/ad3729ba9d3fed328a170340eafb66e8c2a13bdc))

#####
[2.7.3](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.2...v2.7.3)
(2023-03-07)

##### Bug Fixes

- avoid to throw error when link doesn't have parentNode
([#&#8203;1016](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1016))
([6292440](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/62924409895ff6e0e4e599f6734c109ec40e6eff))

#####
[2.7.2](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.1...v2.7.2)
(2022-12-06)

##### Bug Fixes

- don't crash in web workers
([#&#8203;1004](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/1004))
([4d98d4b](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/4d98d4b973be27910b84194e6f7acb1d09f1e8ae))

#####
[2.7.1](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.0...v2.7.1)
(2022-11-29)

##### Bug Fixes

- preserve order of link tags on HMR
([#&#8203;982](https://togithub.com/webpack-contrib/mini-css-extract-plugin/issues/982))
([6ea0922](https://togithub.com/webpack-contrib/mini-css-extract-plugin/commit/6ea092258944fd0330b84dd3455bff9a15320837))

###
[`v2.7.7`](https://togithub.com/webpack-contrib/mini-css-extract-plugin/blob/HEAD/CHANGELOG.md#277-2024-01-10)

[Compare
Source](https://togithub.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.6...v2.7.7)

</details>

<details>
<summary>sass/dart-sass (sass)</summary>

###
[`v1.71.1`](https://togithub.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1711)

[Compare
Source](https://togithub.com/sass/dart-sass/compare/1.71.0...1.71.1)

##### Command-Line Interface

-   Ship the musl Linux release with the proper Dart executable.

##### JavaScript API

-   Export the `NodePackageImporter` class in ESM mode.

- Allow `NodePackageImporter` to locate a default directory even when
the
    entrypoint is an ESM module.

##### Dart API

- Make passing a null argument to `NodePackageImporter()` a static error
rather
    than just a runtime error.

##### Embedded Sass

- In the JS Embedded Host, properly install the musl Linux embedded
compiler
    when running on musl Linux.

###
[`v1.71.0`](https://togithub.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1710)

[Compare
Source](https://togithub.com/sass/dart-sass/compare/1.70.0...1.71.0)

For more information about `pkg:` importers, see [the
announcement][pkg-importers] on the Sass blog.

[pkg-importers]: https://sass-lang.com/blog/announcing-pkg-importers

##### Command-Line Interface

- Add a `--pkg-importer` flag to enable built-in `pkg:` importers.
Currently
    this only supports the Node.js package resolution algorithm, via
    `--pkg-importer=node`. For example, `@use "pkg:bootstrap"` will load
    `node_modules/bootstrap/scss/bootstrap.scss`.

##### JavaScript API

- Add a `NodePackageImporter` importer that can be passed to the
`importers`
option. This loads files using the `pkg:` URL scheme according to the
Node.js
package resolution algorithm. For example, `@use "pkg:bootstrap"` will
load
`node_modules/bootstrap/scss/bootstrap.scss`. The constructor takes a
single
optional argument, which indicates the base directory to use when
locating
    `node_modules` directories. It defaults to
    `path.dirname(require.main.filename)`.

##### Dart API

- Add a `NodePackageImporter` importer that can be passed to the
`importers`
option. This loads files using the `pkg:` URL scheme according to the
Node.js
package resolution algorithm. For example, `@use "pkg:bootstrap"` will
load
`node_modules/bootstrap/scss/bootstrap.scss`. The constructor takes a
single
    argument, which indicates the base directory to use when locating
    `node_modules` directories.

###
[`v1.70.0`](https://togithub.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1700)

[Compare
Source](https://togithub.com/sass/dart-sass/compare/1.69.7...1.70.0)

##### JavaScript API

- Add a `sass.initCompiler()` function that returns a `sass.Compiler`
object
which supports `compile()` and `compileString()` methods with the same
API as
the global Sass object. On the Node.js embedded host, each
`sass.Compiler`
object uses a single long-lived subprocess, making compiling multiple
    stylesheets much more efficient.

- Add a `sass.initAsyncCompiler()` function that returns a
`sass.AsyncCompiler`
object which supports `compileAsync()` and `compileStringAsync()`
methods with
the same API as the global Sass object. On the Node.js embedded host,
each
`sass.AsynCompiler` object uses a single long-lived subprocess, making
    compiling multiple stylesheets much more efficient.

##### Embedded Sass

- Support the `CompileRequest.silent` field. This allows compilations
with no
    logging to avoid unnecessary request/response cycles.

- The Dart Sass embedded compiler now reports its name as "dart-sass"
rather
    than "Dart Sass", to match the JS API's `info` field.

</details>

<details>
<summary>webpack/webpack (webpack)</summary>

###
[`v5.90.3`](https://togithub.com/webpack/webpack/releases/tag/v5.90.3)

[Compare
Source](https://togithub.com/webpack/webpack/compare/v5.90.2...v5.90.3)

#### Bug Fixes

-   don't mangle when destructuring a reexport
-   types for `Stats.toJson()` and `Stats.toString()`
-   many internal types
-   \[CSS] clean up export css local vars

#### Perf

-   simplify and optimize chunk graph creation

###
[`v5.90.2`](https://togithub.com/webpack/webpack/releases/tag/v5.90.2)

[Compare
Source](https://togithub.com/webpack/webpack/compare/v5.90.1...v5.90.2)

#### Bug Fixes

- use `Math.imul` in `fnv1a32` to avoid loss of precision, directly hash
UTF16 values
- the `setStatus()` of the HMR module should not return an array, which
may cause infinite recursion
- `__webpack_exports_info__.xxx.canMangle` shouldn't always same as
default
-   mangle export with destructuring
-   use new runtime to reconsider skipped connections `activeState`
-   make dynamic import optional in `try/catch`
-   improve auto publicPath detection

#### Dependencies & Maintenance

-   improve CI setup and include Node.js@21

###
[`v5.90.1`](https://togithub.com/webpack/webpack/releases/tag/v5.90.1)

[Compare
Source](https://togithub.com/webpack/webpack/compare/v5.90.0...v5.90.1)

#### Bug Fixes

-   set `unmanagedPaths` in defaults
-   correct `preOrderIndex` and `postOrderIndex`
-   add fallback for MIME mismatch error in async wasm loading
-   browsers versions of ECMA features

#### Performance

-   optimize `compareStringsNumeric`
- optimize `numberHash` using 32-bit FNV1a for small ranges, 64-bit for
larger
-   reuse VM context across webpack magic comments

###
[`v5.90.0`](https://togithub.com/webpack/webpack/releases/tag/v5.90.0)

[Compare
Source](https://togithub.com/webpack/webpack/compare/v5.89.0...v5.90.0)

#### Bug Fixes

-   Fixed inner graph for classes
-   Optimized `RemoveParentModulesPlugin` via bigint arithmetic
-   Fixed worklet detection in production mode
-   Fixed an error for cyclic importModule
-   Fixed types for `Server` and `Dirent`
-   Added the `fetchPriority` to hmr runtime's `ensureChunk` function
-   Don't warn about dynamic import for build dependencies
- External module generation respects the
`output.environment.arrowFunction` option
-   Fixed consumimng shared runtime module logic
-   Fixed a runtime logic of multiple chunks
-   Fixed destructing assignment of dynamic import json file
-   Passing errors array for a module hash
-   Added `/*#__PURE__*/` to generated `JSON.parse()`
-   Generated a library manifest after clean plugin
-   Fixed non `amd` externals and `amd` library
-   Fixed a bug in `SideEffectsFlagPlugin` with namespace re-exports
-   Fixed an error message for condition `or`
-   The `strictModuleErrorHandling` is now working
-   Clean up child compilation chunk graph to avoid memory leak
-   \[CSS] - Fixed CSS import prefer relative resolution
-   \[CSS] - Fixed CSS runtime chunk loading error message

#### New Features

-   Allow to set `false` for dev server in `webpack.config.js`
-   Added a warning for async external when not supported
-   Added a warning for async module when not supported
- Added the `node-module` option for the `node.__filename/__dirname` and
enable it by default for ESM target
-   Added the `snapshot.unmanagedPaths` option
-   Exposed the `MultiCompilerOptions` type
-   \[CSS] - Added CSS parser options to enable/disable named exports
-   \[CSS] - Moved CSS the `exportsOnly` option to CSS generator options

#### Dependencies & Maintenance

-   use node.js LTS version for lint
-   bump actions/cache from 3 to 4
-   bump prettier from 3.2.1 to 3.2.3
-   bump assemblyscript
-   bump actions/checkout from 3 to 4

**Full Changelog**:
webpack/webpack@v5.89.0...v5.90.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/google/osv.dev).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"X years ago" is not rounding correctly
2 participants