-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from AlexisOlson/Date
Add Date.Today again
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
let | ||
// Define metadata for the function, describing its purpose and usage. | ||
metaDocumentation = type function ( ) as date meta [ | ||
Documentation.Name = "Date.Today", | ||
Documentation.LongDescription = | ||
//This is the description of the documentation, it only accepts a handful of HTML tags for formatting. | ||
" | ||
<p>Returns the current date value on the system.</p> | ||
<p>This function is a shortcut for Date.From(DateTime.FixedLocalNow())</p> | ||
", | ||
Documentation.Examples = { | ||
[ | ||
Description = " ", | ||
Code = "Date.Today()", | ||
Result = Text.From(Date.From(DateTime.FixedLocalNow())) | ||
] | ||
}], | ||
// Define the main function | ||
myFunction = () as date => Date.From(DateTime.FixedLocalNow()) | ||
in | ||
// Apply the function metadata to myFunction. | ||
Value.ReplaceType(myFunction, metaDocumentation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters