Sha256: e47624536a854b4996e708e61c6686aa1fc3c7bd1ac73bccb77a1f1642946afe
Contents?: true
Size: 315 Bytes
Versions: 31
Compression:
Stored size: 315 Bytes
Contents
# -*- ruby -*- # frozen_string_literal: true require 'date' module PG module TextDecoder class Date < SimpleDecoder def decode(string, tuple=nil, field=nil) if string =~ /\A(\d{4})-(\d\d)-(\d\d)\z/ ::Date.new $1.to_i, $2.to_i, $3.to_i else string end end end end end # module PG
Version data entries
31 entries across 31 versions & 1 rubygems