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

Expose if a date is in a leap year #4273

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Run diplomat gen
  • Loading branch information
CanadaHonk committed Nov 13, 2023
commit 450f63e7f2e35e91a4ba40e015d7723b414acc0c
2 changes: 2 additions & 0 deletions ffi/capi/c/include/ICU4XIsoDate.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ffi/capi/c/include/ICU4XIsoDateTime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions ffi/capi/cpp/docs/source/date_ffi.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions ffi/capi/cpp/docs/source/datetime_ffi.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ffi/capi/cpp/include/ICU4XIsoDate.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions ffi/capi/cpp/include/ICU4XIsoDate.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ffi/capi/cpp/include/ICU4XIsoDateTime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions ffi/capi/cpp/include/ICU4XIsoDateTime.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions ffi/capi/dart/package/lib/src/lib.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions ffi/capi/js/package/docs/source/date_ffi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@
See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.


.. js:method:: year_is_leap()

Returns if the year is a leap year for this date

See the `Rust documentation for year_is_leap <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year_is_leap>`__ for more information.


.. js:method:: months_in_year()

Returns the number of months in the year represented by this date
Expand Down
7 changes: 7 additions & 0 deletions ffi/capi/js/package/docs/source/datetime_ffi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@
See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.


.. js:method:: year_is_leap()

Returns if the year is a leap year for this date

See the `Rust documentation for year_is_leap <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year_is_leap>`__ for more information.


.. js:method:: months_in_year()

Returns the number of months in the year represented by this date
Expand Down
8 changes: 8 additions & 0 deletions ffi/capi/js/package/lib/ICU4XIsoDate.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ export class ICU4XIsoDate {
*/
year(): i32;

/**

* Returns if the year is a leap year for this date

* See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year_is_leap Rust documentation for `year_is_leap`} for more information.
*/
year_is_leap(): boolean;

/**

* Returns the number of months in the year represented by this date
Expand Down
4 changes: 4 additions & 0 deletions ffi/capi/js/package/lib/ICU4XIsoDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export class ICU4XIsoDate {
return wasm.ICU4XIsoDate_year(this.underlying);
}

year_is_leap() {
return wasm.ICU4XIsoDate_year_is_leap(this.underlying);
}

months_in_year() {
return wasm.ICU4XIsoDate_months_in_year(this.underlying);
}
Expand Down
8 changes: 8 additions & 0 deletions ffi/capi/js/package/lib/ICU4XIsoDateTime.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ export class ICU4XIsoDateTime {
*/
year(): i32;

/**

* Returns if the year is a leap year for this date

* See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year_is_leap Rust documentation for `year_is_leap`} for more information.
*/
year_is_leap(): boolean;

/**

* Returns the number of months in the year represented by this date
Expand Down
4 changes: 4 additions & 0 deletions ffi/capi/js/package/lib/ICU4XIsoDateTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export class ICU4XIsoDateTime {
return wasm.ICU4XIsoDateTime_year(this.underlying);
}

year_is_leap() {
return wasm.ICU4XIsoDateTime_year_is_leap(this.underlying);
}

months_in_year() {
return wasm.ICU4XIsoDateTime_months_in_year(this.underlying);
}
Expand Down