Пример #1
0
	struct tm& get_current_tm()
	{
		uint32 now = init_tm();
		k_tm.tm_hour = (now - k_current_day_start_ts) / 3600;
		k_tm.tm_min = ((now - k_current_day_start_ts) % 3600) / 60;
		k_tm.tm_sec = ((now - k_current_day_start_ts) % 3600) % 60;
		return k_tm;
	}
Пример #2
0
 //! puts the day of month
 OutItrT put(OutItrT next, 
             std::ios_base& a_ios, 
             char_type fill_char, 
             const day_type& day) const 
 {
   tm dtm;
   init_tm(dtm);
   dtm.tm_mday = day.as_number();
   char_type tmp[3] = {'%','d'};
   string_type temp_format(tmp);
   return do_put_tm(next, a_ios, fill_char, dtm, temp_format);
 }
Пример #3
0
 OutItrT put(OutItrT next, 
             std::ios_base& a_ios, 
             char_type fill_char, 
             const day_of_week_type& dow) const 
 {
   //if (d.is_special()) { 
   //  return do_put_special(next, a_ios, fill_char, d.as_special());
   //}
   //The following line of code required the date to support a to_tm function
   tm dtm;
   init_tm(dtm);
   dtm.tm_wday = dow;
   return do_put_tm(next, a_ios, fill_char, dtm, m_weekday_format);
 }
Пример #4
0
	uint8 get_current_minute_secs()
	{
		uint32 now = init_tm();
		uint32 minsecs = (now - k_current_day_start_ts) % 3600;
		return minsecs % 60;
	}
Пример #5
0
	uint8 get_current_month_day()
	{
		init_tm();
		return k_tm.tm_mday;
	}
Пример #6
0
	uint8 get_current_month()
	{
		init_tm();
		return k_tm.tm_mon + 1;
	}
Пример #7
0
	uint32 get_current_year()
	{
		init_tm();
		return k_tm.tm_year + 1900;
	}
Пример #8
0
	uint32 get_current_hour()
	{
		uint32 now = init_tm();
		return (now - k_current_day_start_ts) / 3600;
	}
Пример #9
0
	uint32 get_current_year_day()
	{
		init_tm();
		return k_tm.tm_yday;
	}