Module genee::datafile [−][src]
Expand description
Structures and functions related to parsing and processing CSV files that contain habit data
Structs
A complete in-memory representation of the data file.
Enums
Result of an update to a DiaryData instance.
Constants
Format of the date string in the CSV data file. For example: 2020-01-25
Delimeter character used in the CSV data files.
Functions
Calculates the occurences of all habits in the prescribed date interval. Both limits are inclusive.
Calculates the occurences of all habits over multiple periods of date ranges.
Creates a new CSV data file at the specified path from a header list.
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.
Returns a vector of missing dates between the first date in the database until specified date.
Tries to read data file to memory.
Formats a data row with a date to String.
Tries to write a DiaryData instance to the disk at the specified path.
This replaces any existing file (given the process has permission).
Modifies the provided DiaryData instance with the provided data row and date.