I started using a pseudo-similar format as Ubuntu: Y.MMDD
This helps for a few reasons:
- it's easier to check for version requirements: if (version < 8.0901) die/exit/etc.;
- it can be auto-generated in your build process
On that 2nd point (ruby & rake):
def serial(t)
t = Time.now.utc if not t.instance_of?(Time)
t.strftime("%Y").to_i - 2000 + t.strftime("0.%m%d").to_f
end
serial(Time.now) #=> 8.0926
serial(Time.now.utc) #=> 8.0927
NOTE: t.strftime("%Y.%m%d").to_f - 2000 runs into floating point inaccuracies: 8.09269999999992