rllib  1
rltimeex.cpp
Go to the documentation of this file.
1 
2 /***************************************************************************
3  rltime.cpp - description
4  -------------------
5  begin : Tue Jan 02 2001
6  copyright : (C) 2001 by R. Lehrig
7  email : lehrig@t-online.de
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This library is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
14  * published by the Free Software Foundation *
15  * *
16  ***************************************************************************/
17 #include "rltimeex.h"
18 #include <stdio.h>
19 #include <string.h>
20 #include <time.h>
21 #include <sys/stat.h>
22 #include <math.h>
23 
24 #ifdef RLUNIX
25 #include <sys/types.h>
26 #include <sys/time.h>
27 #include <unistd.h>
28 #endif
29 
30 #ifdef __VMS
31 #include <ssdef.h>
32 #include <iodef.h>
33 #include <stdio.h>
34 #include <string.h>
35 #include <starlet.h>
36 #include <descrip.h>
37 #include <lib$routines.h>
38 #include <libdef.h>
39 #include <jpidef.h>
40 typedef struct
41 {
42  short year;
43  short month;
44  short day;
45  short hour;
46  short min;
47  short sec;
48  short hth;
49 }
50 TDS;
51 typedef struct
52 {
53  long word_1;
54  long word_2;
55 }
57 #endif
58 
59 #ifdef RLWIN32
60 #include <windows.h>
61 #include <mmsystem.h>
62 #endif
63 
64 rlTimeEx::rlTimeEx(int Year, int Month, int Day, int Hour, int Minute, int Second, int Millisecond)
65 {
66  year = Year;
67  month = Month;
68  day = Day;
69  hour = Hour;
70  minute = Minute;
71  second = Second;
72  millisecond = Millisecond;
73 }
74 
76 {
77 }
78 
79 void rlTimeEx::setTimeFromString(const char *time_string)
80 {
81  year = 0;
82  month = 0;
83  day = 0;
84  hour = 0;
85  minute = 0;
86  second = 0;
87  millisecond = 0;
88  sscanf(time_string,"%d-%d-%d %d:%d:%d %d",&year,&month,&day, &hour,&minute,&second, &millisecond);
89 }
90 
91 void rlTimeEx::setTimeFromIsoString(const char *iso_time_string)
92 {
93  year = 0;
94  month = 0;
95  day = 0;
96  hour = 0;
97  minute = 0;
98  second = 0;
99  millisecond = 0;
100  sscanf(iso_time_string,"%d-%d-%dT%d:%d:%d.%d",&year,&month,&day, &hour,&minute,&second, &millisecond);
101 }
102 
108 void rlTimeEx::setTimeFromSeconds(double seconds)
109 { // we assume that the average month has 30.5 days
110  double mod = fmod(seconds*1000, 1000);
111  millisecond = (int) mod;
112 
113  mod = fmod(seconds, 60);
114  second = (int) mod;
115 
116  seconds /= 60;
117  mod = fmod(seconds, 60);
118  minute = (int) mod;
119 
120  seconds /= 60;
121  mod = fmod(seconds, 24);
122  hour = (int) mod;
123 
124  seconds /= 24;
125  mod = fmod(seconds, 30.5);
126  day = (int) mod;
127 
128  seconds /= 30.5;
129  mod = fmod(seconds, 12);
130  month = (int) mod;
131 
132  seconds /= 12;
133  year = (int) seconds;
134 }
135 
136 
138 {
139  sprintf(time_string,"%04d-%02d-%02d %02d:%02d:%02d %03d",year, month, day, hour, minute, second, millisecond);
140  return time_string;
141 }
142 
144 {
145  sprintf(iso_time_string,"%04d-%02d-%02dT%02d:%02d:%02d.%03d",year, month, day, hour, minute, second, millisecond);
146  return iso_time_string;
147 }
148 
187 const char *rlTimeEx::toString(const char *format)
188 {
189  // See:
190  // https://doc.qt.io/qt-5/qdatetime.html#toString
191  //
192  int ind = 0;
193  char buf[16];
194  char *dest = time_string;
195  while(*format != '\0')
196  {
197  if (strncmp(format,"dd",2) == 0)
198  {
199  sprintf(buf,"%02d",day);
200  strcpy(dest,buf);
201  dest += strlen(buf);
202  format += 2;
203  }
204  else if(strncmp(format,"d",1) == 0)
205  {
206  sprintf(buf,"%d",day);
207  strcpy(dest,buf);
208  dest += strlen(buf);
209  format += 1;
210  }
211  else if(strncmp(format,"MMM",3) == 0)
212  {
213  buf[0] = '\0';
214  if(month == 1) strcpy(buf,"Jan");
215  if(month == 2) strcpy(buf,"Feb");
216  if(month == 3) strcpy(buf,"Mar");
217  if(month == 4) strcpy(buf,"Apr");
218  if(month == 5) strcpy(buf,"May");
219  if(month == 6) strcpy(buf,"Jun");
220  if(month == 7) strcpy(buf,"Jul");
221  if(month == 8) strcpy(buf,"Aug");
222  if(month == 9) strcpy(buf,"Sep");
223  if(month == 10) strcpy(buf,"Oct");
224  if(month == 11) strcpy(buf,"Nov");
225  if(month == 12) strcpy(buf,"Dec");
226  strcpy(dest,buf);
227  dest += strlen(buf);
228  format += 3;
229  }
230  else if(strncmp(format,"MM",2) == 0)
231  {
232  sprintf(buf,"%02d",month);
233  strcpy(dest,buf);
234  dest += strlen(buf);
235  format += 2;
236  }
237  else if(strncmp(format,"M",1) == 0)
238  {
239  sprintf(buf,"%d",month);
240  strcpy(dest,buf);
241  dest += strlen(buf);
242  format += 1;
243  }
244  else if(strncmp(format,"yyyy",4) == 0)
245  {
246  sprintf(buf,"%4d",year);
247  strcpy(dest,buf);
248  dest += strlen(buf);
249  format += 4;
250  }
251  else if(strncmp(format,"yy",2) == 0)
252  {
253  sprintf(buf,"%4d",year);
254  strcpy(dest,&buf[2]);
255  dest += strlen(&buf[2]);
256  format += 2;
257  }
258  else if(strncmp(format,"hh",2) == 0)
259  {
260  if (hour > 12) sprintf(buf,"%02d", hour - 12);
261  else if(hour == 0) sprintf(buf,"%02d", 12);
262  else sprintf(buf,"%02d", hour);
263  strcpy(dest,buf);
264  dest += strlen(buf);
265  format += 2;
266  }
267  else if(strncmp(format,"h",1) == 0)
268  {
269  if (hour > 12) sprintf(buf,"%2d", hour - 12);
270  else if(hour == 0) sprintf(buf,"%2d", 12);
271  else sprintf(buf,"%2d", hour);
272  strcpy(dest,buf);
273  dest += strlen(buf);
274  format += 1;
275  }
276  else if(strncmp(format,"HH",2) == 0)
277  {
278  sprintf(buf,"%02d",hour);
279  strcpy(dest,buf);
280  dest += strlen(buf);
281  format += 2;
282  }
283  else if(strncmp(format,"H",1) == 0)
284  {
285  sprintf(buf,"%d",hour);
286  strcpy(dest,buf);
287  dest += strlen(buf);
288  format += 1;
289  }
290  else if(strncmp(format,"mm",2) == 0)
291  {
292  sprintf(buf,"%02d",minute);
293  strcpy(dest,buf);
294  dest += strlen(buf);
295  format += 2;
296  }
297  else if(strncmp(format,"m",1) == 0)
298  {
299  sprintf(buf,"%d",minute);
300  strcpy(dest,buf);
301  dest += strlen(buf);
302  format += 1;
303  }
304  else if(strncmp(format,"ss",2) == 0)
305  {
306  sprintf(buf,"%02d",second);
307  strcpy(dest,buf);
308  dest += strlen(buf);
309  format += 2;
310  }
311  else if(strncmp(format,"s",1) == 0)
312  {
313  sprintf(buf,"%d",second);
314  strcpy(dest,buf);
315  dest += strlen(buf);
316  format += 1;
317  }
318  else if(strncmp(format,"zzz",3) == 0)
319  {
320  sprintf(buf,"%03d",millisecond);
321  strcpy(dest,buf);
322  dest += strlen(buf);
323  format += 3;
324  }
325  else if(strncmp(format,"z",1) == 0)
326  {
327  sprintf(buf,"%d",millisecond);
328  strcpy(dest,buf);
329  dest += strlen(buf);
330  format += 1;
331  }
332  else if(strncmp(format,"AP",2) == 0)
333  {
334  if (hour == 0) strcpy(dest,"PM");
335  else if(hour < 13) strcpy(dest,"AM");
336  else strcpy(dest,"PM");
337  dest += strlen("AM");
338  format += 2;
339  }
340  else if(strncmp(format,"ap",2) == 0)
341  {
342  if (hour == 0) strcpy(dest,"pm");
343  else if(hour < 13) strcpy(dest,"am");
344  else strcpy(dest,"pm");
345  dest += strlen("am");
346  format += 2;
347  }
348  else if(strncmp(format,"A",1) == 0)
349  {
350  if (hour == 0) strcpy(dest,"PM");
351  else if(hour < 13) strcpy(dest,"AM");
352  else strcpy(dest,"PM");
353  dest += strlen("AM");
354  format += 1;
355  }
356  else if(strncmp(format,"a",1) == 0)
357  {
358  if (hour == 0) strcpy(dest,"pm");
359  else if(hour < 13) strcpy(dest,"am");
360  else strcpy(dest,"pm");
361  dest += strlen("am");
362  format += 1;
363  }
364  else
365  {
366  *dest++ = *format++;
367  }
368  if(dest - time_string + 6 > sizeof(time_string)) break;
369  }
370  *dest = '\0';
371  return time_string;
372 }
373 
375 {
376 #ifdef RLUNIX
377  time_t t;
378  struct tm *tms;
379  struct timeval tv;
380  struct timezone tz;
381 
382  time(&t);
383  tms = localtime(&t);
384  gettimeofday(&tv, &tz);
385 
386  /* adjust year and month */
387  tms->tm_year += 1900;
388  tms->tm_mon += 1;
389 
390  millisecond = (int)tv.tv_usec / 1000;
391  second = (int)tms->tm_sec;
392  minute = (int)tms->tm_min;
393  hour = (int)tms->tm_hour;
394  day = (int)tms->tm_mday;
395  month = (int)tms->tm_mon;
396  year = (int)tms->tm_year;
397 #endif
398 
399 #ifdef __VMS
400  TDS tds;
401  sys$numtim(&tds, 0);
402  millisecond = (int)tds.hth * 10;
403  second = (int)tds.sec;
404  minute = (int)tds.min;
405  hour = (int)tds.hour;
406  day = (int)tds.day;
407  month = (int)tds.month;
408  year = (int)tds.year;
409 #endif
410 
411 #ifdef RLWIN32
412  SYSTEMTIME st;
413  GetLocalTime(&st);
414  millisecond = st.wMilliseconds;
415  second = st.wSecond;
416  minute = st.wMinute;
417  hour = st.wHour;
418  day = st.wDay;
419  month = st.wMonth;
420  year = st.wYear;
421 #endif
422 }
423 
424 int rlTimeEx::getFileModificationTime(const char *filename)
425 {
426  struct stat statbuf;
427  struct tm *tms;
428 
429 #ifdef RLUNIX
430  if(lstat(filename,&statbuf)) return -1;
431 #else
432  if(stat(filename,&statbuf)) return -1;
433 #endif
434  tms = localtime(&statbuf.st_mtime);
435 
436  /* adjust year and month */
437  tms->tm_year += 1900;
438  tms->tm_mon += 1;
439 
440  millisecond = 0;
441  second = (int)tms->tm_sec;
442  minute = (int)tms->tm_min;
443  hour = (int)tms->tm_hour;
444  day = (int)tms->tm_mday;
445  month = (int)tms->tm_mon;
446  year = (int)tms->tm_year;
447 
448  return 0;
449 }
450 
452 {
453 #ifdef RLUNIX
454  struct timeval tv;
455  struct tm t;
456 
457  t.tm_mday = day;
458  t.tm_mon = month - 1;
459  t.tm_year = year - 1900;
460  t.tm_hour = hour;
461  t.tm_min = minute;
462  t.tm_sec = second;
463  tv.tv_sec = mktime(&t);
464  tv.tv_usec = 1000 * millisecond;
465  settimeofday(&tv,NULL);
466 #endif
467 
468 #ifdef __VMS
469  VAX_BIN_TIME vbt;
470  struct dsc$descriptor_s d_time;
471  char smonth[12][4],buf[64];
472 
473  // Initialize month array
474  memset (smonth , 0, sizeof(smonth));
475  memcpy (smonth [0], "JAN", 3);
476  memcpy (smonth [1], "FEB", 3);
477  memcpy (smonth [2], "MAR", 3);
478  memcpy (smonth [3], "APR", 3);
479  memcpy (smonth [4], "MAY", 3);
480  memcpy (smonth [5], "JUN", 3);
481  memcpy (smonth [6], "JUL", 3);
482  memcpy (smonth [7], "AUG", 3);
483  memcpy (smonth [8], "SEP", 3);
484  memcpy (smonth [9], "OCT", 3);
485  memcpy (smonth [10], "NOV", 3);
486  memcpy (smonth [11], "DEC", 3);
487  // Create time buffer
488  sprintf(buf, "%02d-%3.3s-%04d %02d:%02d:%02d.%02d",
489  day,
490  smonth[month-1],
491  year,
492  hour,
493  minute,
494  second,
495  millisecond / 10);
496 
497  // Fill string descriptor
498  d_time.dsc$w_length = strlen(buf);
499  d_time.dsc$b_dtype = DSC$K_DTYPE_T;
500  d_time.dsc$b_class = DSC$K_CLASS_S;
501  d_time.dsc$a_pointer = buf;
502  // Convert time buf to VAX bin time
503  sys$bintim(&d_time, &vbt);
504  // Set the system time
505  sys$setime(&vbt);
506 #endif
507 
508 #ifdef RLWIN32
509  SYSTEMTIME st;
510  st.wDay = day;
511  st.wMonth = month;
512  st.wYear = year;
513  st.wHour = hour;
514  st.wMinute = minute;
515  st.wSecond = second;
516  st.wMilliseconds = millisecond;
517  SetSystemTime(&st);
518 #endif
519 }
520 
522 {
523  rlTimeEx t;
524  t = *this + time;
525  *this = t;
526  return *this;
527 }
528 
530 {
531  rlTimeEx t;
532  t = *this - time;
533  *this = t;
534  return *this;
535 }
536 
538 {
539  int maxmonth,y,m;
540  rlTimeEx t;
541 
542  t.year = year + time.year;
543  t.month = month + time.month;
544  t.day = day + time.day;
545  t.hour = hour + time.hour;
546  t.minute = minute + time.minute;
547  t.second = second + time.second;
549 
550  y = t.year;
551  if(t.month > 12 || (t.month==12 && t.day==31 && t.hour>=24)) y++;
552  m = t.month;
553  if(t.month > 12 || (t.month==12 && t.day==31 && t.hour>=24)) m = 1;
554 
555  switch(m % 12)
556  {
557  case 1: // january
558  maxmonth = 31;
559  break;
560  case 2: // february
561  maxmonth = 28;
562  // Annus bisextilis (calendario Gregoriano)
563  if(y%4==0)
564  {
565  maxmonth = 29;
566  int hth = y % 100;
567  int special = y % 400; // 1900-+-2100-2200-2300-+-2500-2600-2700
568  if(hth == 0 && special != 0) maxmonth = 28;
569  }
570  break;
571  case 3: // march
572  maxmonth = 31;
573  break;
574  case 4: // april
575  maxmonth = 30;
576  break;
577  case 5: // may
578  maxmonth = 31;
579  break;
580  case 6: // june
581  maxmonth = 30;
582  break;
583  case 7: // july
584  maxmonth = 31;
585  break;
586  case 8: // august
587  maxmonth = 31;
588  break;
589  case 9: // september
590  maxmonth = 30;
591  break;
592  case 10: // october
593  maxmonth = 31;
594  break;
595  case 11: // november
596  maxmonth = 30;
597  break;
598  case 12: // december
599  maxmonth = 31;
600  break;
601  default:
602  maxmonth = 31;
603  break;
604  }
605 
606  if(t.millisecond >= 1000) { t.second++; t.millisecond -= 1000; }
607  if(t.second >= 60) { t.minute++; t.second -= 60; }
608  if(t.minute >= 60) { t.hour++, t.minute -= 60; }
609  if(t.hour >= 24) { t.day++; t.hour -= 24; }
610  if(t.day > maxmonth) { t.month++; t.day -= maxmonth; }
611  if(t.month > 12) { t.year++; t.month -= 12; }
612  return t;
613 }
614 
616 {
617  int maxmonth,y,m;
618  rlTimeEx t;
619 
620  y = 0;
621  t.year = year - time.year;
622  t.month = month - time.month;
623  t.day = day - time.day;
624  t.hour = hour - time.hour;
625  t.minute = minute - time.minute;
626  t.second = second - time.second;
628 
629  if(t.millisecond < 0) { t.second--; t.millisecond += 1000; }
630  if(t.second < 0) { t.minute--; t.second += 60; }
631  if(t.minute < 0) { t.hour--, t.minute += 60; }
632  if(t.hour < 0) { t.day--; t.hour += 24; }
633 
634  if(t.day < 0)
635  {
636  t.month--;
637  y = t.year;
638  m = t.month;
639  if(m <= 0) { m += 12; y--; }
640  switch(m % 12)
641  {
642  case 1: // january
643  maxmonth = 31;
644  break;
645  case 2: // february
646  maxmonth = 28;
647  // Annus bisextilis (calendario Gregoriano)
648  if(y%4==0)
649  {
650  maxmonth = 29;
651  int hth = y % 100;
652  int special = y % 400; // 1900-+-2100-2200-2300-+-2500-2600-2700
653  if(hth == 0 && special != 0) maxmonth = 28;
654  }
655  break;
656  case 3: // march
657  maxmonth = 31;
658  break;
659  case 4: // april
660  maxmonth = 30;
661  break;
662  case 5: // may
663  maxmonth = 31;
664  break;
665  case 6: // june
666  maxmonth = 30;
667  break;
668  case 7: // july
669  maxmonth = 31;
670  break;
671  case 8: // august
672  maxmonth = 31;
673  break;
674  case 9: // september
675  maxmonth = 30;
676  break;
677  case 10: // october
678  maxmonth = 31;
679  break;
680  case 11: // november
681  maxmonth = 30;
682  break;
683  case 12: // december
684  maxmonth = 31;
685  break;
686  default:
687  maxmonth = 31;
688  break;
689  }
690  t.day += maxmonth;
691  }
692 
693  if(y >= 0)
694  {
695  //printf("after christ was born. thus everything is ok.\n");
696  }
697  else
698  {
699  //printf("before christ was born. now also ok\n");
700  { t.month++; t.day -= 30; }
701  if(t.day < 30) { t.day++; t.hour -= 24; }
702  if(t.hour < 0 ) { t.hour++; t.minute -= 60; }
703  if(t.minute < 0 ) { t.minute++; t.second -= 60; }
704  if(t.second < 0 ) { t.second++; t.millisecond -= 1000; }
705  }
706 
707  return t;
708 }
709 
716 {
717  rlTimeEx t, sec;
719  t = *this + sec;
720  *this = t;
721  return *this;
722 }
723 
730 {
731  rlTimeEx t, sec;
733  t = *this - sec;
734  *this = t;
735  return *this;
736 }
737 
743 rlTimeEx rlTimeEx::operator+(double seconds) const
744 {
745  rlTimeEx t, sec;
747  t = *this + sec;
748  return t;
749 }
750 
756 rlTimeEx rlTimeEx::operator-(double seconds) const
757 {
758  rlTimeEx t, sec;
760  t = *this - sec;
761  return t;
762 }
763 
765 {
766  if(year != time.year) return 0;
767  if(month != time.month) return 0;
768  if(day != time.day) return 0;
769  if(hour != time.hour) return 0;
770  if(minute != time.minute) return 0;
771  if(second != time.second) return 0;
772  if(millisecond != time.millisecond) return 0;
773 
774  return 1;
775 }
776 
778 {
779  rlTimeEx diff,t1;
780 
781  t1.year = year;
782  t1.month = month;
783  t1.day = day;
784  t1.hour = hour;
785  t1.minute = minute;
786  t1.second = second;
788  //printf("<t1=%s\n",t1.getTimeString());
789  //printf("<time=%s\n",time.getTimeString());
790  diff = t1 - time;
791  //printf("<diff=%s\n",diff.getTimeString());
792  if(diff.year < 0) return 1;
793  if(diff.month < 0) return 1;
794  if(diff.day < 0) return 1;
795  if(diff.hour < 0) return 1;
796  if(diff.minute < 0) return 1;
797  if(diff.second < 0) return 1;
798  if(diff.millisecond < 0) return 1;
799  return 0;
800 }
801 
803 {
804  if((*this) == time) return 1;
805  if((*this) < time) return 1;
806  return 0;
807 }
808 
810 {
811  rlTimeEx diff,t1;
812 
813  t1.year = year;
814  t1.month = month;
815  t1.day = day;
816  t1.hour = hour;
817  t1.minute = minute;
818  t1.second = second;
820  //printf(">t1=%s\n",t1.getTimeString());
821  //printf(">time=%s\n",time.getTimeString());
822  diff = time - t1;
823  //printf(">diff=%s\n",diff.getTimeString());
824  if(diff.year < 0) return 1;
825  if(diff.month < 0) return 1;
826  if(diff.day < 0) return 1;
827  if(diff.hour < 0) return 1;
828  if(diff.minute < 0) return 1;
829  if(diff.second < 0) return 1;
830  if(diff.millisecond < 0) return 1;
831  return 0;
832 }
833 
835 {
836  if((*this) == time) return 1;
837  if((*this) > time) return 1;
838  return 0;
839 }
840 
842 {
843  struct tm begin;
844  struct tm test;
845 
846  memset(&begin,0,sizeof(tm));
847  memset(&test,0,sizeof(tm));
848 
849  begin.tm_year = 70;
850  begin.tm_mon = 0;
851  begin.tm_mday = 1;
852  begin.tm_hour = 0;
853  begin.tm_min = 0;
854  begin.tm_sec = 0;
855 
856  test.tm_year = year - 1900;
857  test.tm_mon = month - 1;
858  test.tm_mday = day;
859  test.tm_hour = hour;
860  test.tm_min = minute;
861  test.tm_sec = second;
862 
863  time_t t0 = mktime(&begin);
864  time_t t1 = mktime(&test);
865 
866  return difftime(t1,t0) + (((double) millisecond) / 1000);
867 }
868 
873 double rlTimeEx::seconds() const
874 {
875  double ret = (((double) millisecond) / 1000) + second + minute*60 + hour*60*60 + month*60*60*30.5 + year*60*60*30.5*12;
876  return ret;
877 }
878 
rlTimeEx(int Year=0, int Month=0, int Day=0, int Hour=0, int Minute=0, int Second=0, int Millisecond=0)
Definition: rltimeex.cpp:64
int hour
Definition: rltimeex.h:61
void setLocalTime()
Definition: rltimeex.cpp:451
char time_string[32 *2]
Definition: rltimeex.h:66
const char * getTimeString()
Definition: rltimeex.cpp:137
int millisecond
Definition: rltimeex.h:64
int operator>=(rlTimeEx &time) const
Definition: rltimeex.cpp:834
int minute
Definition: rltimeex.h:62
const char * toString(const char *format)
Definition: rltimeex.cpp:187
int operator>(rlTimeEx &time) const
Definition: rltimeex.cpp:809
double seconds() const
Definition: rltimeex.cpp:873
void setTimeFromString(const char *time_string)
Definition: rltimeex.cpp:79
#define RLWIN32
Definition: rldefine.h:42
int operator<(rlTimeEx &time) const
Definition: rltimeex.cpp:777
rlTimeEx operator-(rlTimeEx &time) const
Definition: rltimeex.cpp:615
int getFileModificationTime(const char *filename)
Definition: rltimeex.cpp:424
double secondsSinceEpoche() const
Definition: rltimeex.cpp:841
const char * getIsoTimeString()
Definition: rltimeex.cpp:143
int operator==(rlTimeEx &time) const
Definition: rltimeex.cpp:764
void setTimeFromSeconds(double seconds)
Definition: rltimeex.cpp:108
int second
Definition: rltimeex.h:63
Definition: rltime.cpp:38
char iso_time_string[32]
Definition: rltimeex.h:67
int operator<=(rlTimeEx &time) const
Definition: rltimeex.cpp:802
rlTimeEx operator+(rlTimeEx &time) const
Definition: rltimeex.cpp:537
int month
Definition: rltimeex.h:59
virtual ~rlTimeEx()
Definition: rltimeex.cpp:75
rlTimeEx & operator+=(rlTimeEx &time)
Definition: rltimeex.cpp:521
int day
Definition: rltimeex.h:60
rlTimeEx & operator-=(rlTimeEx &time)
Definition: rltimeex.cpp:529
void getLocalTime()
Definition: rltimeex.cpp:374
void setTimeFromIsoString(const char *iso_time_string)
Definition: rltimeex.cpp:91
int year
Definition: rltimeex.h:58