-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
doc/src/references/builtin/Date and Time/Global Properties/SCRIPT_BUILD_TIME.nvgt
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,15 @@ | ||
/** | ||
Contains the timestamp when the calling nvgt program was compiled. | ||
const timestamp SCRIPT_BUILD_TIME; | ||
## Remarks: | ||
This property will be set to the time when NVGT launched if it is accessed by a script running from source. Otherwise, it will contain a timestamp set to when the .nvgt script was compiled into an executable. | ||
*/ | ||
|
||
// Example: | ||
void main() { | ||
if (!SCRIPT_COMPILED) { | ||
alert("oops", "This only works in compiled scripts."); | ||
return; | ||
} | ||
alert("Script compiled on", datetime(SCRIPT_BUILD_TIME).format(DATE_TIME_FORMAT_RFC850)); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// NonVisual Gaming Toolkit (NVGT) | ||
// Copyright (C) 2022-2024 Sam Tupy | ||
// License: zlib (see license.md in the root of the NVGT distribution) | ||
|
||
void main() { | ||
alert("test", datetime(SCRIPT_BUILD_TIME).format(DATE_TIME_FORMAT_ISO8601)); | ||
} |