class Awscr::Signer::Date

Overview

A wrapper to provide time formats required by signing

date = Date.new(Time.now)
date.ymd
date.iso8601

Included Modules

Defined in:

awscr-signer/core/date.cr

Constant Summary

DATE_YMD = "%Y%m%d"
ISO8601_BASIC = "%Y%m%dT%H%M%SZ"
RFC1123Z = "%a, %d %b %Y %H:%M:%S %z"

Constructors

Instance Method Summary

Constructor Detail

def self.new(timestamp : Time) #

[View source]

Instance Method Detail

def <=>(time : Time) #

Compare the Date object to a Time object


[View source]
def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


[View source]
def iso8601 #

Return the date in ISO8601 basic format


[View source]
def rfc1123z #

Return the date in RFC1123Z format


[View source]
def timestamp : Time #

[View source]
def to_s(*args) #

Delegate to_s to the underlying time


[View source]
def ymd #

Return the date in YYMMDD format


[View source]