From: Konrad Meyer Date: 2007-09-03T05:17:11+09:00 Subject: Re: time class changed in ruby-1.8.6? --nextPart1825687.LNcCXvTW88 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 02 September 2007 08:28:45 am Matthew Rudy wrote: > Ball, Donald A Jr (Library) wrote: > > Hi guys. I'm in the process of migrating a ruby app from 1.8.5 to 1.8.6 > > and noticed that the Time class seems to have changed. It used to have a > > convenient to_date method, but is now lacking it, and I've had little > > luck trying to find the release notes indicating why this changed. Can > > anyone point in that direction and/or suggest a better way of converting > > times to dates? Merci. > >=20 > > - donald >=20 > I think I've found another change. > I don't know if this is on purpose. >=20 > But at some point before ruby 1.8.6 the following code worked; >=20 > >> Time.now.strftime("%d %h '%y") =20 > =3D> "02 Sep '07" > >> Time.now.strftime("%d %b '%y") =20 > =3D> "02 Sep '07" >=20 > But now in 1.8.6; >=20 > >> Time.now.strftime("%d %h '%y") > =3D> "" > >> Time.now.strftime("%d %b '%y") > =3D> "02 Sep '07" >=20 > ie. seemingly support for "%h" has been removed. It hasn't been here. irb(main):001:0> Time.now.strftime("%h") =3D> "Sep" irb(main):002:0> RUBY_VERSION =3D> "1.8.6" =2D-=20 Konrad Meyer http://konrad.sobertillnoon.com/ --nextPart1825687.LNcCXvTW88 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG2xo8CHB0oCiR2cwRAiGiAKCc1jiUQ6G/LDx8d2cdHE409wTMuACdEfsO s+tpkJNxbMXAE6bGuZqOc0s= =RCZe -----END PGP SIGNATURE----- --nextPart1825687.LNcCXvTW88--