I am trying to make it so if it is Friday there will be special deal's in the shop. I have looked through tons of questions and only found super complex answers. I found on the wiki that when called with a data table it should return a table or something? :P I am new with tables... But anyway it looks like it should be pretty easy to get the month, day, hour, year, etc. As said I am new with table so could someone help explain this?
That API refers to passing in dates, not getting them back. Roblox doesn't provide a way to get real dates back out as of right now. (This would be os.date
in real Lua.)
Despite this, it's still possible, albeit challenging, to get the real date by mathematical calculation on the Unix epoch.
For a quick answer, you can use the following code which will print the current day (e.g. Friday
) using a module written by BlueTaslem.
local Date = require(271818993) print(Date():format( "Week" )) --> Friday
For further reading, see:
Enable HTTPService and use this:
local hs = game:GetService("HttpService") local rawdata = hs:GetAsync("https://www.checkiday.com/", true) if(type(rawdata)=='string') then -- print(rawdata) local result= rawdata:match('\<meta name="description" content="(.+)- Today') print("today is: "..result) end