Commit Graph

10 Commits

Author SHA1 Message Date
Anna Schumaker 198fbf7f9b core/file: Create a new, unified file structure
We'll spend the next several patches slowly switching over to the new
way of accessing files.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2018-02-20 15:39:33 -05:00
Anna Schumaker 82280edfa2 core/file: Rename struct file -> struct data_file
I'm going to create a unified struct file that should be able to share
code between data and cache files.  The first step is to push the old
structure to the side so it can still be used in other places.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2018-02-20 15:39:33 -05:00
Anna Schumaker 50db0db06a core/date: Add functions for reading and writing date stamps
The date stamp is a single value that represents year, month, and day.
This should be slightly easier than working with three separate values.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker d222c306e0 core/date: Force struct date into 32bits
Three unsigned integers is overkill for handling dates.

Implements #65: Date structure can be represented with a single 32bit
value
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:50:22 -04:00
Anna Schumaker 9e0c4404fc core/date: Add date_set() to directly set a date structure
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:54 -05:00
Anna Schumaker ea35d81c22 core/date: Add date_string() to convert a date to a string
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:54 -05:00
Anna Schumaker f5d744a75c core/date: Add date_{read|write} functions for date IO
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:54 -05:00
Anna Schumaker af1939a6e7 core/date: Add date_compare() for comparing two dates
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:54 -05:00
Anna Schumaker cef39bc0fc core/date: Add date_today() function for finding today's date
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:54 -05:00
Anna Schumaker d230396cb2 core/date: Add new file for date structure code
Moving this out of the track class should help to simplify the code.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:54 -05:00