• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about GregorianCalendar class  RSS feed

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

If I create a GregorianCalendar object like that:

GregorianCalendar date = new GregorianCalendar();

Are we sure that date contains the today date?
if not, how could we force the created object to contain the today date?

Best Regards
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public GregorianCalendar() constructs a default GregorianCalendar using the current time in the default time zone with the default locale.
 
Water! People swim in water! Even tiny ads swim in water:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!