// Url // // Douglas Thrift // // $Id$ #include #include "Url.hpp" cse::String Url::GetModified() const { ext::Buffer buffer(22); size_t size(::strftime(buffer.Begin(), buffer.GetSize(), "%FT%TTZ", modified)); buffer.SetSize(size); return buffer; } cse::String Url::GetFrequency() const { switch (frequency) { case always: return _B("always"); case hourly: return _B("hourly"); case daily: return _B("daily"); case weekly: return _B("weekly"); case monthly: return _B("monthly"); case yearly: return _B("yearly"); case never: return _B("never"); _nodefault } } cse::String Url::GetPriority() const { _assert (priority < 11); switch (priority) { default: return _S() << _B("0.") << priority; case 10: return _B("1.0"); } }