Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions temporal_capi/bindings/c/PlainMonthDay.h

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

2 changes: 2 additions & 0 deletions temporal_capi/bindings/c/PlainYearMonth.h

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

4 changes: 4 additions & 0 deletions temporal_capi/bindings/cpp/temporal_rs/PlainMonthDay.d.hpp

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

14 changes: 14 additions & 0 deletions temporal_capi/bindings/cpp/temporal_rs/PlainMonthDay.hpp

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

2 changes: 2 additions & 0 deletions temporal_capi/bindings/cpp/temporal_rs/PlainYearMonth.d.hpp

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

7 changes: 7 additions & 0 deletions temporal_capi/bindings/cpp/temporal_rs/PlainYearMonth.hpp

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

9 changes: 9 additions & 0 deletions temporal_capi/src/plain_month_day.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,25 @@ pub mod ffi {
pub fn day(&self) -> u8 {
self.0.day()
}

pub fn calendar<'a>(&'a self) -> &'a Calendar {
Calendar::transparent_convert(self.0.calendar())
}

pub fn month(&self) -> u8 {
self.0.month_code().to_month_integer()
}

pub fn month_code(&self, write: &mut DiplomatWrite) {
let code = self.0.month_code();
// throw away the error, this should always succeed
let _ = write.write_str(code.as_str());
}

pub fn reference_year(&self) -> i32 {
self.0.reference_year()
}

pub fn to_plain_date(
&self,
year: Option<PartialDate>,
Expand Down
4 changes: 4 additions & 0 deletions temporal_capi/src/plain_year_month.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ pub mod ffi {
self.0.era_year()
}

pub fn reference_day(&self) -> u8 {
self.0.reference_day()
}

pub fn calendar<'a>(&'a self) -> &'a Calendar {
Calendar::transparent_convert(self.0.calendar())
}
Expand Down
Loading