Date/Day of month. Is any function that returns the date or day of month?

Hello everyone.

I was just wondering if there was a function that returns the day of the month or date. Say for example I wanted to return “27” for todays date or “27th Feb” or anything of that description.

I know there is a function for day of the week and I know there is a function that returns something similar to “Wed May 21 01:08:47 2014”. I’m just wondering if there is a function that returns similar output but without the time on the end. Really with all the other functions I can pull it all together but what Particle seems to be lacking is day of the month type function.

Wondering if I’m missing something and it actually exists?

Thanks in advance

The methods of the Time object should do what you want, mostly.

int day =;
Serial.printlnf("day=%d", day); // day=27

String s = Time.format("%d %b");
Serial.println(s); // 27 Feb

You can generate pretty much any time format using Time.format, which uses strftime() internally.