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 » How to add 6 months to a date?
Re: How to add 6 months to a date? [message #36702 is a reply to message #36701] Tue, 26 June 2012 22:34 Go to previous messageGo to previous message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
Thanks.

I was playing with U++ Date type and editdate and calendar controls and realized U++ is smart enough to know when a month has 28 or 30 or 31 days.

For example, what I expected I get with the code below:
Date d = cal1.GetDate(); //read date
	d += (30 * 6); // add 6 months: 30 days * 6
	cal2.SetDate(d); // write to the other calendar


That's the behavior I wanted.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Solved]XML Rpc client will halt when server is not running
Next Topic: GetTimeZoneText() warning
Goto Forum:
  


Current Time: Wed Aug 27 12:18:35 CEST 2025

Total time taken to generate the page: 0.06387 seconds