From 2e27ba79a9614274a743cd0591ad7a76d28b0930 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Mon, 31 Aug 2026 14:53:00 -0500 Subject: [PATCH] Adding DateTime::ToString(fmt) formatting --- DateTime%3A%3AToString-formating.md | 1 - DateTime_ToString_Formating.md | 30 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) delete mode 100644 DateTime%3A%3AToString-formating.md create mode 100644 DateTime_ToString_Formating.md diff --git a/DateTime%3A%3AToString-formating.md b/DateTime%3A%3AToString-formating.md deleted file mode 100644 index 89650dc..0000000 --- a/DateTime%3A%3AToString-formating.md +++ /dev/null @@ -1 +0,0 @@ -| Code | What it does | Example | \ No newline at end of file diff --git a/DateTime_ToString_Formating.md b/DateTime_ToString_Formating.md new file mode 100644 index 0000000..aec4854 --- /dev/null +++ b/DateTime_ToString_Formating.md @@ -0,0 +1,30 @@ +Supported DateTime format strings +================================= +| Code | Description | Example | +|------|-------------|---------| +| `%a` | Abbreviated weekday name | `Tue` | +| `%A` | Full weekday name | `Tuesday` | +| `%h` / `%b` | Abbreviated month name | `Sep` | +| `%B` | Full month name | `September` | +| `%C` | Century (year / 100) | `20` | +| `%y` | Year, two digits, zero-padded | `26` | +| `%Y` | Year, four digits | `2026` | +| `%m` | Month, zero-padded | `09` | +| `%d` | Day of month, zero-padded | `01` | +| `%e` | Day of month, space-padded | ` 1` | +| `%H` | Hour (24h), zero-padded | `13` | +| `%I` | Hour (12h), zero-padded | `01` | +| `%M` | Minute, zero-padded | `07` | +| `%S` | Second, zero-padded | `05` | +| `%p` | AM or PM | `PM` | +| `%r` | 12h time (`%I:%M:%S %p`) | `01:07:05 PM` | +| `%R` | 24h time, hours + minutes | `13:07` | +| `%T` | 24h time, full | `13:07:05` | +| `%F` | Date (`%Y-%m-%d`) | `2026-09-01` | +| `%D` | Date (`%m/%d/%y`) | `09/01/26` | +| `%u` | Day of week, **Mon=1 … Sun=7** (ISO 8601) | `2` | +| `%w` | Day of week, **Sun=0 … Sat=6** | `2` | +| `%c` | Locale-preferred date + time | `Tue Sep 1 13:07:05 2026` | +| `%%` | Literal `%` | `%` | +| `%n` | Newline | `\n` | +| `%t` | Tab | `\t` | \ No newline at end of file