karbarcca/Datetime.jl — pull request #17 by dcjones (2013-10-19 21:47:50+00:00)
Title: Change the types of some arithmetic operations.

I've been working on plotting Datetime types in Gadfly, and I have the basics working now.

Most of my code is pretty type-generic but makes a few assumptions about the types its plotting. The types in Datetime mostly conform to these assumptions but don't in a few places. I've made some changes here so they do:

* `(/)(x::T, y::T)` results in a plain number if T is a time type. (E.g. `year(100) / year(10) == 10`)
* `(*)(x::T, y::Number)` returns an object of type T (E.g. `10 * year(10) == year(100)`)
* Define `isfinite(::T)` to always return true.

If you don't find these changes offensive, it would make plotting somewhat easier. If you'd rather not, I can still make it work, it will just be a uglier.