Module datafile

Module datafile 

Source
Expand description

Handling of habit databases.

Structs§

DiaryDataSqlite

Enums§

AddCategoryResult
Result from the call to add_category
HideCategoryResult
Result from the call to hide_category
SuccessfulUpdate
Result of an update to a DiaryDataSqlite instance.

Constants§

DATE_FORMAT
Format of the dates used in the program.

Functions§

create_new_datafile
Create a new database on the prescribed path, using the prescribed headers.
create_new_sqlite
get_date_ranges
Calculates the date ranges according to the parameters. For example when range_size == 30, iters == 3 and from_date is today, the result is a 3-element vector containing ranges of the last 30 days, the 30 days before that, and the 30 days before the latter one.
open_datafile
Tries to read data file to memory.