U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Format(Time time, bool seconds) problem
Format(Time time, bool seconds) problem [message #25642] Fri, 05 March 2010 12:34 Go to previous message
koldo is currently offline  koldo
Messages: 3464
Registered: August 2008
Senior Veteran
Hello all

Now Format(Time) removes hour and minute when hour == minute == second == 0.

This affects too to EditTime control.

Would it be possible to remove this behavior or at least to add some parameter to avoid it ?

I am forced to have full date and time all the day.

String Format(Time time, bool seconds) {
	if(IsNull(time)) return String();
	String s = Format(Date(time));
	if(time.hour == 0 && time.minute == 0 && time.second == 0)
		return s;
	else
		return s + (seconds ? Format(" %02d:%02d:%02d", time.hour, time.minute, time.second)
	                        : Format(" %02d:%02d", time.hour, time.minute));
}


Thank you Smile


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FormatDouble and numbers under 1e-15
Next Topic: FindFile::IsExecutable() [Feature request]
Goto Forum:
  


Current Time: Tue Nov 10 01:46:09 GMT+1 2026

Total time taken to generate the page: 0.00593 seconds