aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-29 23:12:41 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-29 23:12:41 -0400
commit37780cb3234441d693dcb0f2d1d4efbd6632a0a6 (patch)
tree1d4da2a4a582ad419525114a366be00c83a6f8c0
parentd7145198095d9f316ecffc97499ae2791384da20 (diff)
Update docs
-rw-r--r--docs/datetime.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/datetime.md b/docs/datetime.md
index 1cbc324e..7e528def 100644
--- a/docs/datetime.md
+++ b/docs/datetime.md
@@ -96,7 +96,7 @@ The date in `YYYY-MM-DD` format.
**Example:**
```markdown
->> DateTime(2024, 9, 29):format("%A")
+>> DateTime(2024, 9, 29):date()
= "2024-09-29"
```
@@ -111,14 +111,13 @@ options, return a text representation of the given date in the given format. If
**Usage:**
```markdown
-datetime:format(format: Text = "%c %Z", local_time : Bool = yes) -> Text
+datetime:format(format: Text = "%Y-%m-%dT%H:%M:%S%z", local_time : Bool = yes) -> Text
```
**Parameters:**
-- `path`: The path of the file to append to.
-- `bytes`: The bytes to append to the file.
-- `permissions` (optional): The permissions to set on the file if it is being created (default is `0o644`).
+- `format`: The `strftime` format to use (default: `"%Y-%m-%dT%H:%M:%S%z"`).
+- `local_time`: Whether to use local time (default: `yes`) or UTC.
**Returns:**
Nothing.
@@ -321,14 +320,15 @@ or a null value if the value could not be successfully parsed.
**Usage:**
```markdown
-DateTime.parse(text: Text, format: Text = "%Y-%m-%dT%H:%M:%S. %f%z") -> DateTime?
+DateTime.parse(text: Text, format: Text = "%Y-%m-%dT%H:%M:%S%z") -> DateTime?
```
**Parameters:**
- `text`: The text to parse.
- `format`: The date format of the text being parsed (see:
- [strptime](https://linux.die.net/man/3/strptime) for more info on this format) (default: `"%c %Z"`).
+ [strptime](https://linux.die.net/man/3/strptime) for more info on this
+ format) (default: `"%Y-%m-%dT%H:%M:%S%z"`).
**Returns:**
If the text was successfully parsed according to the given format, return a