Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * RTC_Time.h
- * 27-02-2017 07:32
- */
- String form(int value){
- String result = String(value);
- if (value<10){
- return result = "0"+result;
- }
- return result;
- }
- String DayOfWeek(int n){
- const String Days[]={"Mn","Tu","We","Th","Fr","Sa","Sn"};
- return Days[n-1];
- }
- String Time2Str(void)
- {
- myRTC.updateTime();
- String result =
- form(myRTC.dayofmonth)+"/"+
- form(myRTC.month)+"/"+
- form(myRTC.year)+" "+
- form(myRTC.hours)+":"+
- form(myRTC.minutes)+"."+
- form(myRTC.seconds);
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement