From: Pablo Lorenzzoni Date: 2003-12-04T17:31:03+09:00 Subject: Re: Swatch's internet time in Ruby [Code Inside] Hello (again :-)) Em Qui, 04 Dez 2003, Hal Fulton escreveu: | Oh, sorry to reply to myself. I now see you added 1 to the hour. | I overlooked that. Yes... It is the BMT stuff... | BTW, if you want a style comment, here's one: Explicit returns are | rarely needed, especially as the last expression becomes the | return value. Thanx... I come from a explicit-return-needed-world... Sometimes I just forget it's Ruby I am using... ;-) | Also you don't really need "self" in all those places. Noted again. | How about this: | | def bmt_hour | h = gmtime.hour + 1 | h == 24 ? 0 : h | end Good! I didn't know Ruby had the (cond) ? (if-true) : (if-false) syntax... []s Pablo -- Pablo Lorenzzoni (Spectra) GnuPG: 0x268A084D at pgp.mit.edu/keyring.debian.org This message is protected by DoubleROT13 encryption Attempting to decode it violates the DMCA/WIPO acts