Sha256: 75355129afc3ca55f106ecb622721e934a499949918c23de4d26b6ecd535a3ec
Contents?: true
Size: 317 Bytes
Versions: 5
Compression:
Stored size: 317 Bytes
Contents
# -*- ruby -*- # frozen_string_literal: true require 'date' module YSQL 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
5 entries across 5 versions & 1 rubygems