Factor out parse_datetime()

Create a new function that takes a time stamp and updates the date or
time components of that time stamp according to a given date/time
string. Use that function for updating the start time of an item.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2016-10-09 18:11:33 +02:00
parent 1f39b5c668
commit 343d68596d
3 changed files with 45 additions and 25 deletions

View File

@@ -1136,6 +1136,7 @@ int check_time(unsigned, unsigned);
int parse_time(const char *, unsigned *, unsigned *);
int parse_duration(const char *, unsigned *);
int parse_date_duration(const char *, unsigned *);
int parse_datetime(const char *, long *);
void file_close(FILE *, const char *);
void psleep(unsigned);
int fork_exec(int *, int *, const char *, const char *const *);