3 ms·
If you're going to make a calendar format, why not steal from existing formats? mbox format (http://qmail.org./man/man5/mbox.html http://qmail.org./man/man5/mbo
by throwaway892238 4y ago
If you're going to make a calendar format, why not steal from existing formats? mbox format (http://qmail.org./man/man5/mbox.html http://qmail.org./man/man5/mbox.html):
From LAPTOP Sat Jan 3 01:05:34 1996
Subject: CAL EVENT: Call gas company
Account number: 12345678
From ANDROID
Date: Tuesday, May 31st, 2020 6pm EDT
Subject: CAL EVENT: Meet Chris after work for drinks at Bad Bar
A format like that could be edited in a text editor, or easily loaded into a simple app with an existing parser library. A single mbox could be a calendar with each e-mail a calendar item, which is easy to search/filter by an email client. As a bonus it supports MIME encoding to attach files. You can use one date format, or several, and have a script easily re-format the date lines if you want to grep/awk it.
Other existing formats (https://en.wikipedia.org/wiki/ICalendar https://en.wikipedia.org/wiki/ICalendar) have features missing here, like date/time ranges, recurrence, status, allday, reminder time/method. While you might not want them yet, you may want to convert your calendar to/from another format in the future.
- tero 4y agoThanks for the pointers to these formats. I created calendar.txt format to meet some requirements: - One line, one day - easy to use with Linux command line tools I use every day (grep, sort...) - Simplicity: no recurrence, no date time ranges (but I can of course grep for project tag "+pw" to see the first and last date for the project) - Fast to write, even on mobile - Use ISO 8601 standard dates, have standard weeks near dates