Difference between revisions of "Textutils.formatTime"
From ComputerCraft Wiki
m (Moved to CAT:APIFunctions) |
|||
| Line 20: | Line 20: | ||
}} | }} | ||
}} | }} | ||
| + | |||
| + | [[Category:API_Functions]] | ||
Revision as of 18:41, 28 November 2012
| Formats a time that is in float format. | |
| Syntax | textutils.formatTime(float time, boolean isTwentyFourHour) |
| Returns | string formatted time |
| Part of | ComputerCraft |
| API | textutils |
Examples
| Prints the Minecraft world time in 24-hour time. | |
| Code |
print(textutils.formatTime(os.time(), true)) |
| Output | Depends on the time of day in your world, it will look something like this: "17:30". |