X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mymail.git;a=blobdiff_plain;f=mymail.c;h=fe2d9a048abad05cac1bc1c93475ca458e5b2aa4;hp=ffc562145f6ef7bf69bf4d8cdc4b50610987481b;hb=2acc0a4abd8b818906f5cd027805f77b6a012a25;hpb=c2a75b190fced9a626a70fb2886889ce0e231af7 diff --git a/mymail.c b/mymail.c index ffc5621..fe2d9a0 100644 --- a/mymail.c +++ b/mymail.c @@ -733,6 +733,13 @@ void init_condition(struct search_condition *condition, char *full_string) { condition->interval_stop = 0; } + else if(strcmp(search_field, "24h") == 0 || + strcmp(search_field, "today") == 0) { + condition->field_id = ID_INTERVAL; + condition->interval_start = time(0) - 3600 * 24; + condition->interval_stop = 0; + } + else if(strcmp(search_field, "week") == 0) { condition->field_id = ID_INTERVAL; condition->interval_start = time(0) - 3600 * 24 * 7; @@ -745,10 +752,9 @@ void init_condition(struct search_condition *condition, char *full_string) { condition->interval_stop = 0; } - else if(strcmp(search_field, "24h") == 0 || - strcmp(search_field, "today") == 0) { + else if(strcmp(search_field, "year") == 0) { condition->field_id = ID_INTERVAL; - condition->interval_start = time(0) - 3600 * 24; + condition->interval_start = time(0) - 3600 * 24 * 365; condition->interval_stop = 0; }