os.date
Returns a formatted date and time string. It will format the current time, unless you pass a Unix timestamp (in seconds) as the second argument.
os.date Function | |
---|---|
Syntax os.date(
| |
Returns | string text |
API | os |
Source | CC:Tweaked |
Template:To do
{
|
|||
Prints the current time and date. | |||
Code | <nowiki>
print(os.date("%d.%m.%Y %H:%M"))
</nowiki>
|
||
Output | 13.02.2020 18:00
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.