Sha256: 551449925a79ff4d2817265f0c8428c1df30786b3e07d079b5b2bc4696628160
Contents?: true
Size: 342 Bytes
Versions: 40
Compression:
Stored size: 342 Bytes
Contents
# frozen_string_literal: true class Time # # Format a time object to a Discord formatted string. # # @param ["f", "F", "d", "D", "t", "T", "R"] type The format to use. # # @return [String] The formatted time. # def to_df(type = nil) if type.nil? "<t:#{to_i}>" else "<t:#{to_i}:#{type}>" end end end
Version data entries
40 entries across 40 versions & 1 rubygems