Files
herolib/lib/servers/calendar/calbox/timerange.v
2025-02-17 06:40:06 +03:00

14 lines
259 B
V

module calbox
@[params]
pub struct TimeRange {
pub mut:
start i64 // UTC timestamp (epoch)
end i64 // UTC timestamp
}
// Checks if a timestamp falls within a time range
fn is_in_range(ts i64, tr TimeRange) bool {
return ts >= tr.start && ts < tr.end
}