Update README, todos and example

This commit is contained in:
Joscha 2021-12-19 15:33:28 +01:00
parent 14525088f9
commit 3d9c4102b6
4 changed files with 25 additions and 151 deletions

View file

@ -72,6 +72,7 @@ pub struct DateSpec {
pub end_delta: Option<Delta>,
pub end_time: Option<Spanned<Time>>,
pub repeat: Option<Repeat>,
// TODO Allow specifying amount of repetitions
}
#[derive(Debug)]
@ -256,9 +257,11 @@ pub struct BirthdaySpec {
pub enum Statement {
Date(Spec),
BDate(BirthdaySpec),
// TODO Allow specifying delta and repetitions for FROM and UNTIL
From(Option<NaiveDate>),
Until(Option<NaiveDate>),
Except(NaiveDate), // TODO Allow excluding ranges
// TODO Allow excluding ranges (maybe with --range syntax?)
Except(NaiveDate),
Move {
span: Span,
from: NaiveDate,

View file

@ -227,7 +227,7 @@ impl fmt::Display for Statement {
impl fmt::Display for DoneDate {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// TODO Convert to Dates and back to remove redundant dates?
// TODO Remove redundant dates
match self {
DoneDate::Date { root } => write!(f, "{}", root),
DoneDate::DateTime { root, root_time } => write!(f, "{} {}", root, root_time),