|
| 28 Oct 2015 03:31 PM |
I know how to get a players time, however I don't know how to do the date method.
How would I do this?
Dr Darky Magic |
|
|
| Report Abuse |
|
|
| 28 Oct 2015 03:34 PM |
| http://www.roblox.com/Time-GUI-item?id=133268920 |
|
|
| Report Abuse |
|
|
| 28 Oct 2015 03:37 PM |
No no no. I want the 'Date', not the time. Thanks anyway for your help!
Dr Darky Magic |
|
|
| Report Abuse |
|
|
| 28 Oct 2015 03:42 PM |
If there is not a way, please tell me.
Dr Darky Magic |
|
|
| Report Abuse |
|
|
| 28 Oct 2015 03:45 PM |
| My apologies. This is the one: http://uk.roblox.com/Date-GUI-item?id=133089954 |
|
|
| Report Abuse |
|
|
| 28 Oct 2015 03:46 PM |
Thank you very much. I appreciate your help.
Dr Darky Magic |
|
|
| Report Abuse |
|
|
| 28 Oct 2015 04:15 PM |
I haven't attempted to get the date before but here's how I'd expect to do it.
local months = { {name = "Janurary", days = 31}, {name = "February", days = 28}, {name = "March", days = 31}, {name = "April", days = 30}, {name = "May", days = 31}, {name = "June", days = 30}, {name = "July", days = 31}, {name = "August", days = 31}, {name = "September", days = 30}, {name = "October", days = 31}, {name = "November", days = 30}, {name = "December", days = 31} }
local days = { "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday" }
function getDate() local year = 1970 + math.floor(os.time() / 31557600) local day = math.ceil((os.time() % 31557600) / 86400) local month local dayofmonth months[2].days = year % 4 == 0 and 29 or 28 for i = 1, #months do if day < months[i].days then month = months[i].name dayofmonth = day break else day = day - months[i].days end end local day = days[(math.floor(os.time() / 86400) % 7) + 1] print(string.format("%s %dth %s %d", day, dayofmonth, month, year)) end
getDate() |
|
|
| Report Abuse |
|