aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorhistoria <gravel.justness270@slmail.me>2024-07-26 06:22:37 -0400
committerhistoria <gravel.justness270@slmail.me>2024-07-26 06:22:37 -0400
commitccae757cfe9f8d77bdb51e0684a18275d2521b9f (patch)
treedd0e3d33cd49e0d21d7bf22eb538c923e76638f5 /README.md
parent9ba419479378a5e827f9e815a4faaf38983b1e13 (diff)
downloadsoon-ccae757cfe9f8d77bdb51e0684a18275d2521b9f.tar.gz
Updated README examples
Diffstat (limited to 'README.md')
-rw-r--r--README.md86
1 files changed, 61 insertions, 25 deletions
diff --git a/README.md b/README.md
index 94304fe..da48a30 100644
--- a/README.md
+++ b/README.md
@@ -18,24 +18,37 @@ DATE, EVENT
- Lines beginning with `-` are additional details attached to the above event.
- Blank lines are ignored.
-Otherwise, a line is an event. Everything before the first comma is interpreted as the date, which is a list of conditions separated by whitespace. Parameters can be written in any order.
+Otherwise, a line is an event. Everything before the first comma is interpreted as the date, which is a list of conditions separated by whitespace. Parameters can be written in any order. Short or long month and weekday names can be used.
-## Simple examples
-
-This syntax should cover the vast majority of events
+## Example Syntax
```
+# Common dates and recurrence
+
+2025 Jul 17, Hike Mt. Fuji
+Jan 1, New Year's Day (Jan 1 every year)
+Tue, Taco night (Every Tuesday)
+1, Mortgage due (1st of every month)
+, Journal (Every day)
+
+# Times
+
2025 Jan 1 00:00-03:00, Work party
2025 Jan 1 04:00, Go to bed
-2025 Feb 13, Project due
-Jan 1, New Year's Day (Jan 1 every year)
-Tue, Taco night (Every Tuesday)
-1, Mortgage due (1st of every month)
+20:00 Fri, Friday Night Magic (Every Friday at 8pm)
+9am, Coffee (Every day at 9am)
+
+# Logic and Date Ranges
+
+Mon | Wed | Fri, Submit TPS Report (Every Mon, Wed, or Fri)
+Fri !13, Every Friday except the 13th
+July 7-13 2024, Shark Week
+(Jun 25 2025)-(Jul 4 2025), Japan Trip
-Mon Wed Fri, Submit TPS Report (Every Monday, Wednesday, or Friday)
-20:00 Fri, Friday Night Magic (Every Friday at 8pm)
-9am, Coffee (Every day at 9am)
-, Journal (Every day)
+# Uncommon recurrence patterns
+
+J%3, Every third day
+Fri 1W, First Friday of the month
```
## Adding details to events
@@ -48,18 +61,27 @@ Any line starting with a `-` or `+` is attached to the nearest above event. This
- Dr. Elias Berkins, +1 (555)-123-1234
```
+## Date Groups (`()`)
+
+You can put a day, month, and optionally year in parentheses to treat it as a single date. This lets you use the date for ranges and with the `!` operator like you'd expect.
+
+```
+Sun !(Dec 25), Every Sunday except Dec 25. The ! does NOT expand to !Dec !25.
+(June 25 2025)-(Sep 1 2025), Summer Vacation
+```
+
## Ranges (`-`)
-You can specify ranges with a dash for any condition. This works for dates if you group a day and month (and optionally year) in parentheses.
+You can specify ranges with a dash for days, weekdays, months, years, and date groups.
```
Mon-Fri, Work every weekday
Jan 1-7 2025, Las Vegas convention
(Jan 30 2025)-(Feb 3 2025), Ski trip
-(Dec 25)-(Jan 2), Christmas vacation
+(Dec 25)-(Jan 2), Christmas vacation every year
```
-You can omit one end of a date range to mean "before" or "after".
+You can omit one end of a date range to mean before or after a certain date.
```
Fri -(Sep 13 2025), Every Friday before Sep 13 2025
@@ -68,17 +90,16 @@ Fri (Sep 13 2025)-, Every Friday after Sep 13 2025
## Logical Operators (`|`, `!`)
-Parameters can be grouped with parentheses.\
`|` means OR.\
`!` means NOT.\
AND is *implied* by whitespace between conditions
```
1 | 15, Every 1st OR 15th
-Fri !13, Every Fridaym, NOT the 13th
+Fri !13, Every Friday, NOT the 13th
Sun !(Dec 25), Every Sunday, NOT December 25
2025 Aug 14, 2025 AND August AND the 14th
-1 2, Every 1st AND 2nd (i.e. never)
+1 2, Every 1st AND 2nd (never)
```
## First/last week(s) of Month (`W`, `L`)
@@ -94,20 +115,35 @@ May 1L Mon, Memorial Day (Last Monday of May)
1W Fri, First Friday (of every month)
```
+## Time
+
+You can express times in 24h format or AM/PM format like this. Your agenda will be sorted by the start time of events.
+
+```
+Fri 06:00, With no am/pm, 24h time is assumed
+Fri 12:00am, Midnight
+Fri 12pm, Noon
+
+# You can include ranges if you'd like
+Fri 05:00-06:00, Breakfast
+Fri 12pm-1pm, Lunch
+```
+
## Modified Julian Date (`J%n+y`)
-Similar to When, Then supports using a Modified Julian Date as `J`. `J` is the number of days since midnight November 17, 1858. This can be used along with the modulo operator `%` to create more complex recurring events.
+Then supports using a Modified Julian Date as `J`. `J` is the number of days since midnight November 17, 1858. This can be used along with the modulo operator `%` to create complex recurring events.
```
+J%3, Every third day
!(J%14-5), Every other Saturday
!(J%14+2), Every other Saturday (on the other weeks)
-```
+Sat J%2, Every other Saturday expressed in a different way
-Note, you can't put spaces in here like `!(J % 3)` because spaces are always interpreted as AND.
-
-This syntax sucks but is included because it's possible. It's on the outside edge of what Then is intended to support support while still meeting the primary goal of every parameter being a condition. It's included as a last resort to allow for "every N days" when necessary.
+# You can use it for recurring reminders too
+Jul 10-19 2025 !(J%3-2), This event repeats July 10, 13, 16, 19
+```
-You technically can express dates like "Repeat every 3 days between July 10-19 2025" as `>(Jul 10 2025) <(Jul 19 2025) !(J%3-2)`, but Then syntax is optimized for simple cases and gets klugey for complex recurring events.
+Julian date modulus is definitely weird, but it's a concise way to express multiple uncommon recurring patterns without increasing program complexity and syntax vocabulary for features I virtually never use. Plus it's an homage to [When](https://www.lightandmatter.com/when/when.html), and I love When.
## Deadline Recipe (TODO: Redo this entirely)
@@ -154,7 +190,7 @@ If you deal with events with unusual recurrence patterns or conditions, Remind i
Every 3 days between July 10-19 2025:\
**Remind**: `REM Jul 10 2025 *3 THROUGH Jul 19 2025`\
-**then**: `(Jul 10 2025)-(Jul 19 2025) !(J%3-2)`
+**then**: `Jul 10-19 !(J%3-2)`
If you have any case on the edge of what Then supports, or far beyond, you should use Remind instead.