Commit Graph

67 Commits

Author SHA1 Message Date
Dominik Csapak
a96e9fb724 proxmox-time: calendar-events: make compute_next_event a method
and deprecated the standalone function

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 07:14:06 +01:00
Dominik Csapak
032787a6a3 proxmox-time: lib.rs: rustfmt
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 07:13:45 +01:00
Dominik Csapak
676146fd90 proxmox-time: move tests from time.rs to test.rs
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 07:13:36 +01:00
Dominik Csapak
22b3388500 proxmox-time: move TimeSpan into time_span.rs
and related parsing functions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 07:13:23 +01:00
Dominik Csapak
6a680aac55 proxmox-time: move CalendarEvent into calendar_events.rs
and all relevant parsing functions as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 07:13:08 +01:00
Dominik Csapak
83cf350f04 proxmox-time: daily_duration.rs: rustfmt
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 07:12:51 +01:00
Dominik Csapak
78e1e8ce09 proxmox-time: move parse_daily_duration to daily_duration.rs
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 07:12:35 +01:00
Dominik Csapak
f61ee1372f proxmox-time: split DateTimeValue into own file
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 06:55:51 +01:00
Dominik Csapak
07cc21bd5a proxmox-time: move WeekDays into own file
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 06:55:32 +01:00
Dominik Csapak
a104c8fc41 proxmox-time: move common parse functions to parse_helpers
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 06:55:04 +01:00
Dominik Csapak
8e0fc66dfe proxmox-time: calendar-events: make hour optional
to be compatible with our perl calendar events, we have to make hour optional
in that case we select every hour, so 'X' is the same as writing '*:X'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 06:54:32 +01:00
Dominik Csapak
8480b7b4ff proxmox-time: calendar-events: implement repeated ranges
so that we can have e.g. '7..17/2:00' as timespec

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-01 06:53:55 +01:00
Wolfgang Bumiller
60fa521095 time: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-29 14:56:31 +01:00
Dietmar Maurer
3a378a34bb bump proxmox-time version to 1.1.0 2021-11-17 13:03:36 +01:00
Dietmar Maurer
6871232791 proxmox-time: remove custom error type
None of the functions we call returns a resonable error number anyways.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-17 13:03:36 +01:00
Dietmar Maurer
4a5dbd2129 proxmox-time: added time related fuctions from proxmox-systemd crate.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-17 13:03:36 +01:00
Wolfgang Bumiller
9b6fe4aceb add proxmox-time crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00