Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 3361
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: Thu May 16 01:49:10 CEST 2024

Total time taken to generate the page: 0.02000 seconds