platformx 0.0.9.6.2 → 0.0.9.6.3

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
  SHA1:
3
- metadata.gz: 95c1e376d57c488d3f32b62c484b18d38bce1865
4
- data.tar.gz: ef924d6458ba4fbddd330ccc7c74e966533f4683
3
+ metadata.gz: d13206b17878f5c0a94a1bec39a237fbb6954cca
4
+ data.tar.gz: b7d0a8011dc5dcdc0212dc2457b8fe83204c440f
5
5
  SHA512:
6
- metadata.gz: 26f0376f18ed76b33ac849bb5a0af344867d01be702ad8fbefd058f517f20519a543e1e17fd89032916a8391cead823d0c3cf3a8dec4d6d0c343e6be842c777c
7
- data.tar.gz: 3bc7f81e764e6e07b68c551e15444a7a587a5cd1b446f69ddc62b32937803736d25cc9c500e2bf9fec2dfc05dca74bbedec7f9d4575a3b2a3bf7246cf6ccc287
6
+ metadata.gz: e8f847567d350d0afc9d27bc5dfe91f0c23e7dbaff94933c03727913f6fb53f061dfca7aa2aed012ed50932957826c9d7c33ccbecd55ee437eed45391ebab49e
7
+ data.tar.gz: ec922c0e77cb01454c15bad2d4fa50f2601d10a0ba0d503b2efcbb65f41aecfeef47494a33d1f25e487f4d7f833609fd0482c5c1a3e04d6c4687673a585e8d74
@@ -50,16 +50,29 @@ module Platformx
50
50
  # @param show_time [Boolean] if the timme should be incldued
51
51
  # @param show_month [Boolean] if teh month should be included
52
52
  # @return [String] formated representation of the given date
53
- def x_format_date(date: "", show_time: false, show_month: true)
53
+ def x_format_date(date: "", show_time: false, show_month: true, format: "long")
54
54
  if date.nil?
55
55
  return ""
56
56
  else
57
- time = date.strftime("%A, %B %d, %Y")
58
-
57
+
58
+
59
+ if format == "mdy"
60
+ time = date.strftime("%m-%d-%Y")
61
+ elsif format == "d-m-y"
62
+ time = date.strftime("%d-%m-%Y")
63
+ elsif format == "m/d/y"
64
+ time = date.strftime("%D")
65
+ else
66
+ # Long format
67
+ time = date.strftime("%A, %B %d, %Y")
68
+ end
69
+
70
+ # Show time
59
71
  if show_time == true
60
72
  time = time + date.strftime(" %l:%M %p")
61
73
  end
62
-
74
+
75
+ # Return time
63
76
  return time
64
77
  end
65
78
  end
@@ -1,3 +1,3 @@
1
1
  module Platformx
2
- VERSION = "0.0.9.6.2"
2
+ VERSION = "0.0.9.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platformx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.6.2
4
+ version: 0.0.9.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - timmushen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-10 00:00:00.000000000 Z
11
+ date: 2018-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler