Thursday, June 03, 2004

Java date problems follow up...

Some kind, anonymous, soul just posted this link in a comment on yesterdays post. It's a good article generally on Calendar, and explains some of the history of Java and dates. I especially liked the following.

International Calendars in Java: "You would think that when we deprecated most of Date and added the new Calendar class, we would have fixed Date's biggest annoyance: the fact that January is month 0. We certainly should have, but unfortunately we didn't. We were afraid that programmers would be confused if Date used zero-based months and Calendar used one-based months. And a few programmers probably would have been. But in hindsight, the fact that Calendar is still zero-based has caused an enormous amount of confusion, and it was probably the biggest single mistake in the Java international API's."

Thank you to whoever posted that.

11 comments:

Mikael Grev said...

Have you seen any stange behaviour with Calendar (Gregorian) in beta2? I sometime get a GregorianCalendar which when setting the HOUR_OF_DAY (even to the same value as it already is) jumps a full year! The problem is that I can't recreate the calendar that does this in a simple way, a new calendar with the EXACT same date/time/zone doesn't behave in the same way. It happens every time in a specific place in my program, I can watch it in the debugger and it is very frustrating. Works in 1.4.2_04.

Cheers,
Mikael

Matt Large said...

Hi Mikael, I'd not tried 1.5 in any flavour. I just downloaded it and gave it a try with my date selector, which I wouldn't have thought would give the same problem as you, but still I was happy that there were no problems. It seems to work great with 1.5-b2

Junda Xu said...

20150709 junda
michael kors bags
true religion jeans
prada shoes
michael kors watches
ed hardy uk
tory burch shoes
coach factory outlet
chanel online shop
oakley store
oakley outlet
fitflops shoes
kate spade handbags
longchamp pliage
ralph lauren sale
kate spade
beats headphones
oakley sunglasses sale
kate spade outlet
nike blazer pas cher
chaussure louboutin pas cher
cheap ray bans
replica watches rolex
true religion sale
michael kors outlet
ray ban wayfarer
mcm backpack
coach outlet store online
abercrombie and fitch
burberry outlet
gucci uk
louboutin
michael kors outlet
michael kors handbags
mont blanc pens
cheap oakleys
michael kors outlet online
soccer shoes
ralph lauren homme
nike air force 1
gucci handbags

Wenhao Guo said...

arizona cardinals
coach outlet store
chicago bears
michael kors outlet online
soccer jerseys,soccer jerseys wholesale,soccer jerseys cheap,soccer jerseys for sale,cheap soccer jersey,usa soccer jersey,football jerseys
ugg boots on sale
cheap oakley sunglasses
true religion sale
kobe 9 elite
nike air max 2014
mont blanc
ed hardy outlet
philadelphia eagles
belstaff jackets
michael kors handbags sale
vans sneakers
michael kors handbags,michael kors outlet,michael kors outlet online,michael kors,kors outlet,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors
nike free
north face outlet
nike air huarache,nike huarache,nike huarache sneakers,nike huarache shoes
pittsburgh steelers
boston celtics
ralph lauren
air jordan 11 free shipping
nike air max 90
swarovski outlet
michael kors online outlet
nike running shoes
baltimore ravens
winter jackets outlet
san antonio spurs
cheap uggs
dddd1110

xumeiqing said...

151204meiqing
instyler curling iron
nike trainers
polo ralph lauren
ray ban sunglasses
coach factory outlet
michael kors outlet online
louis vuitton
michaek kors outlet
ed hardy clothing
coach factory outlet
coach factory outlet
adidas originals
nike air max
ralph lauren sale
cheap uggs
kobe bryant shoes
ugg boots sale
marc jacobs
lebron james shoes
oakley sunglasses wholesale
coach outlet store online
coach outlet
coach outlet
ray ban sunglasses
ray-ban sunglasses
fake oakleys
nike running shoes
jordan 11
pandora jewelry
timberland boots
cheap nfl jerseys
ray ban outlet
abercrombie
the north face
michael kors uk
michael kors outlet online
oakley sunglasses wholesale
north face uk
cheap oakley sunglasses
michael kors outlet

raybanoutlet001 said...

seahawks jersey
jimmy choo shoes
cheap oakley sunglasses
converse trainers
ralph lauren outlet online
bengals jersey
michael kors handbags outlet
saics running shoes
nike huarache
longchamp bags

Unknown said...

jianbin1125
rolex watches
louis vuitton handbags outlet
basketball shoes,basketball sneakers,lebron james shoes,sports shoes,kobe bryant shoes,kobe sneakers,nike basketball shoes,running shoes,mens sport shoes,nike shoes
futbol baratas
cheap jordans
coach factory outlet
hollister clothing store
kobe shoes
ugg boots uk
polo shirts

chenmeinv0 said...

louboutin outlet
cheap rolex watches
canada goose outlet
burberry scarf
spurs jerseys
ugg boots outlet
michael kors outlet clearance
louis vuitton handbags
uggs sale
gucci outlet online
chenyingying20161130

Jian Zhuo said...

burberry outlet
christian louboutin shoes
rayban
christian louboutin shoes
adidas outlet
oakley sunglasses
birkenstock sandals
canada goose outlet
rolex daytona
ralph lauren outlet online
2016127

chenmeinv0 said...

michael kors outlet clearance
mlb jerseys cheap
ugg boots outlet
oakley sunglasses outlet
michael kors handbags outlet
pandora uk
coach outlet online
adidas outlet
retro jordan 13
cheap pandora jewelry
20171.23chenjinyan

chenmeinv0 said...

coach outlet store online
louis vuitton purses
chaussures le coq sportif
coach outlet online
oakley vault
giuseppe zanotti sneakers
coach outlet store online
spurs jerseys
coach outlet online
coach outlet online
2017.2.23xukaimin