nutritionfactsorg / daily-dozen-android

Keep track of the foods that Dr. Greger recommends in his NYT's best-selling book, How Not to Die with this Android app
https://play.google.com/store/apps/details?id=org.nutritionfacts.dailydozen&hl=en
Other
274 stars 95 forks source link

Add date or timestamp to the backup filename #220

Open codeinabox opened 1 year ago

codeinabox commented 1 year ago

Would it be possible to add the date or timestamp to the backup filename? eg dailydozen_back_24012023.json

I save my backup to SyncThing and it errors if the filename already exists, so it would be very handy if each new backup has a unique filename.

marc-medley commented 1 year ago

@slavick As FYI, the iPhone app is currently setup for filename with a format of "DailyDozen_yyyyMMdd_HHmmss.extension". The yyyyMMdd date format allows for a most-significant-value sort order (year month day), e.g 20221101, 20221224, 20230124, …, etc. A name fragment such as _back is not used since this seems redundant with having the timestamp.