Archived
restructure: move el compiler content into lang/
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// cross-calendar-comparison.el — same Instant under two different calendars
|
||||
// produces identical cal_to_instant() outputs. Calendar choice does not change
|
||||
// the underlying instant — only the projection.
|
||||
|
||||
fn run_test() -> Int {
|
||||
let i: Instant = unix_seconds(1782216000)
|
||||
let z: Zone = zone("America/New_York")
|
||||
let earth: Calendar = earth_calendar(z)
|
||||
let mars: Calendar = mars_calendar()
|
||||
let ct_earth: CalendarTime = in_calendar(i, earth)
|
||||
let ct_mars: CalendarTime = in_calendar(i, mars)
|
||||
let i_earth: Instant = cal_to_instant(ct_earth)
|
||||
let i_mars: Instant = cal_to_instant(ct_mars)
|
||||
if i_earth == i_mars {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
fn main() -> Void {
|
||||
println(int_to_str(run_test()))
|
||||
}
|
||||
Reference in New Issue
Block a user