apiverve_unixtimestamp 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8685d6df835bac4cc4383f244aebe5ebe2d73757d522d18f50a979c9dde4d552
4
- data.tar.gz: ab3f9c39d5c55927843b8e6580f4ef90ad934d769ea2a577a32c11b23254cee5
3
+ metadata.gz: b405d20c3f1b41e50b8dd4a6c168b467e91a0fcbcdc0e219b9af618edc5918a2
4
+ data.tar.gz: 5501d92c68d929187dcdf78ec5801da086a64725c0dc8eefa63b0ca41e9496fd
5
5
  SHA512:
6
- metadata.gz: d67ddb0bc550e3bf325fa2621e0dc8db5f7d236139e55c759c9da4b9738edaa3fe2cca9518ccef8ac215b14e5fef204405323ae5bf11dd4ef6a6e48d89982169
7
- data.tar.gz: e90fafaa1a68f53bd397bf3265ed268ae305745311231eaca52ebc58a0f52deb24c967291ece58a45974f15e9699749e7b3200f85e7285c177c1b785c330527e
6
+ metadata.gz: 4c634def815b01a77e05f9c4974a43c8ffd20a3f766e70f1d408fdc5930fc12a687344aaae77732ee6b9bb345325ae07d9aafd80823ecd29991b830e11791af2
7
+ data.tar.gz: 85b33dc20baa45d04551dd28d7765ee2b531479702bf3c1df8aa3f2fcc44c6db6065b736e7650aeff79083862659d74f917ef8cc07cbb02cf4df72724b214f1f
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Unix Timestamp Converter API - Ruby Gem
2
2
 
3
- Unix Timestamp Converter converts Unix timestamps into formatted dates and parses ISO 8601 strings back into epoch seconds. Responses break down dates into ISO 8601, RFC 2822, simple time strings, and individual calendar components like year, month, and hour.
3
+ Unix Timestamp Converter converts Unix timestamps into formatted dates and parses ISO 8601 strings back into epoch seconds. Responses break down dates into ISO 8601, RFC 2822, simple time strings, individual calendar components like year, month and hour, plus the day of the year. Paid plans add the ISO week, and an IANA timezone to also get the same moment in local time with its UTC offset, abbreviation and daylight saving flag.
4
4
 
5
5
  ## Installation
6
6
 
@@ -37,7 +37,8 @@ client = APIVerve::Unixtimestamp::Client.new(api_key: "YOUR_API_KEY")
37
37
  # Make a request
38
38
  response = client.execute({
39
39
  timestamp: "1609459200",
40
- format: "seconds"
40
+ format: "seconds",
41
+ timezone: "America/New_York"
41
42
  })
42
43
 
43
44
  # Print the response
@@ -49,7 +50,7 @@ puts response
49
50
 
50
51
  ```ruby
51
52
  begin
52
- response = client.execute({ timestamp: "1609459200", format: "seconds" })
53
+ response = client.execute({ timestamp: "1609459200", format: "seconds", timezone: "America/New_York" })
53
54
  puts response["data"]
54
55
  rescue APIVerve::Unixtimestamp::ValidationError => e
55
56
  puts "Validation error: #{e.errors.join(', ')}"
@@ -78,7 +79,7 @@ client = APIVerve::Unixtimestamp::Client.new(
78
79
  "data": {
79
80
  "timestamp": 1609459200,
80
81
  "timestamp_format": "seconds",
81
- "iso_8601": "2021-01-01T00:00:00Z",
82
+ "iso_8601": "2021-01-01T00:00:00.000Z",
82
83
  "rfc_2822": "Fri, 01 Jan 2021 00:00:00 GMT",
83
84
  "date": "1/1/2021",
84
85
  "time": "12:00:00 AM",
@@ -91,7 +92,28 @@ client = APIVerve::Unixtimestamp::Client.new(
91
92
  "minute": 0,
92
93
  "second": 0,
93
94
  "day_of_week": "Friday",
94
- "timezone": "UTC"
95
+ "timezone": "UTC",
96
+ "day_of_year": 1,
97
+ "iso_week": "2020-W53",
98
+ "local": {
99
+ "timezone": "America/New_York",
100
+ "iso_8601": "2020-12-31T19:00:00-05:00",
101
+ "date": "12/31/2020",
102
+ "time": "7:00:00 PM",
103
+ "year": 2020,
104
+ "month": 12,
105
+ "day": 31,
106
+ "hour": 19,
107
+ "minute": 0,
108
+ "second": 0,
109
+ "day_of_week": "Thursday",
110
+ "day_of_year": 366,
111
+ "iso_week": "2020-W53",
112
+ "utc_offset": "-05:00",
113
+ "utc_offset_seconds": -18000,
114
+ "abbreviation": "EST",
115
+ "is_dst": false
116
+ }
95
117
  }
96
118
  }
97
119
  ```
@@ -10,7 +10,7 @@ module APIVerve
10
10
  #
11
11
  # @example Basic usage
12
12
  # client = APIVerve::Unixtimestamp::Client.new(api_key: "your_api_key")
13
- # response = client.execute({ timestamp: "1609459200", format: "seconds" })
13
+ # response = client.execute({ timestamp: "1609459200", format: "seconds", timezone: "America/New_York" })
14
14
  # puts response
15
15
  #
16
16
  # @see https://apiverve.com/marketplace/unixtimestamp?utm_source=ruby&utm_medium=referral&utm_content=readme
@@ -19,7 +19,7 @@ module APIVerve
19
19
  DEFAULT_TIMEOUT = 30
20
20
 
21
21
  # Validation rules for parameters
22
- VALIDATION_RULES = { 'timestamp' => { type: 'string', required: true, format: 'timestamp' }, 'format' => { type: 'string', required: false } }
22
+ VALIDATION_RULES = { 'timestamp' => { type: 'string', required: true, format: 'timestamp' }, 'format' => { type: 'string', required: false }, 'timezone' => { type: 'string', required: false, format: 'timezone' } }
23
23
 
24
24
  # Format validation patterns
25
25
  FORMAT_PATTERNS = {
@@ -4,6 +4,6 @@ require_relative "apiverve_unixtimestamp/client"
4
4
 
5
5
  module APIVerve
6
6
  module Unixtimestamp
7
- VERSION = "1.2.3"
7
+ VERSION = "1.2.5"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiverve_unixtimestamp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIVerve
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-10-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: faraday
@@ -60,8 +59,10 @@ dependencies:
60
59
  version: '2.0'
61
60
  description: Unix Timestamp Converter converts Unix timestamps into formatted dates
62
61
  and parses ISO 8601 strings back into epoch seconds. Responses break down dates
63
- into ISO 8601, RFC 2822, simple time strings, and individual calendar components
64
- like year, month, and hour.
62
+ into ISO 8601, RFC 2822, simple time strings, individual calendar components like
63
+ year, month and hour, plus the day of the year. Paid plans add the ISO week, and
64
+ an IANA timezone to also get the same moment in local time with its UTC offset,
65
+ abbreviation and daylight saving flag.
65
66
  email:
66
67
  - hello@apiverve.com
67
68
  executables: []
@@ -80,7 +81,6 @@ metadata:
80
81
  source_code_uri: https://github.com/apiverve/unixtimestamp-API/tree/main/ruby
81
82
  changelog_uri: https://apiverve.com/changelog
82
83
  documentation_uri: https://docs.apiverve.com/ref/unixtimestamp
83
- post_install_message:
84
84
  rdoc_options: []
85
85
  require_paths:
86
86
  - lib
@@ -95,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.0.3.1
99
- signing_key:
98
+ rubygems_version: 4.0.23
100
99
  specification_version: 4
101
100
  summary: Unix Timestamp Converter API - Ruby Client
102
101
  test_files: []