Creating a temporary copy of a Calendar Object in Java -


i need figure out how create temporary calendar object (a copy of "permanent" calendar exists) can manipulate copy: tempcal.add (unit, value). need keep original calendar object unchanged, don't want call add(unit, value) on directly.

since none of attempts @ creating copy worked, current ugly hack call permanentcal.add(unit, value), display desired results, call permanentcal.add (unit, -value) -- seems, uncool.

java.util.calendar has clone method, use that. data in made of primitives, not run troubles.

have @ these answers:


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -