drexed-datetime 0.0.3 → 0.0.4
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 +4 -4
 - data/app/helpers/datetime_helper.rb +87 -0
 - data/lib/drexed/datetime.rb +2 -2
 - data/lib/drexed/datetime/version.rb +1 -1
 - metadata +2 -3
 - data/lib/drexed/datetime_helper.rb +0 -91
 - data/lib/drexed/railtie.rb +0 -9
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 88b3d7413a13b45bf807f8aea1ad5d12f60fe453
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 7cc60c75b0dcf7537713dc2fd943434cc5300d3b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 884110d533c76e125825cc2d0030d0f052171b54787c5883d43f139fca91f2617da2835208fa8dbff840cb8a676c6f5dc282d503e3f440bdef84023986fdc395
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 34c402c01e133f810e933e31c76760ac57330838534f7828d3b4ed2c35293e06d4e94cd99fda887e278aca072104abc88fc6541cda7ee985dd6ee51c36d36ea7
         
     | 
| 
         @@ -0,0 +1,87 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module DatetimeHelper
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              def month_day_and_time_for(tach)
         
     | 
| 
      
 4 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 5 
     | 
    
         
            +
                  tach.strftime("%B %e at %I:%M %p")
         
     | 
| 
      
 6 
     | 
    
         
            +
                end
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              def date_time_for(tach)
         
     | 
| 
      
 10 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 11 
     | 
    
         
            +
                  tach.strftime("%B %e, %Y at %I:%M %p")
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              def date_for(tach)
         
     | 
| 
      
 16 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 17 
     | 
    
         
            +
                  tach.strftime("%B %e, %Y")
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              def twenty_four_hour_time_for(tach)
         
     | 
| 
      
 22 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 23 
     | 
    
         
            +
                  tach.strftime("%H:%M")
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              def twelve_hour_time_for(tach)
         
     | 
| 
      
 28 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 29 
     | 
    
         
            +
                  tach.strftime("%I:%M %p")
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
              end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
              def month_name_for(tach)
         
     | 
| 
      
 34 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 35 
     | 
    
         
            +
                  tach.strftime("%B")
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
              end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
              def abbr_month_name_for(tach)
         
     | 
| 
      
 40 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 41 
     | 
    
         
            +
                  tach.strftime("%b")
         
     | 
| 
      
 42 
     | 
    
         
            +
                end
         
     | 
| 
      
 43 
     | 
    
         
            +
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
              def day_name_for(tach)
         
     | 
| 
      
 46 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 47 
     | 
    
         
            +
                  tach.strftime("%A")
         
     | 
| 
      
 48 
     | 
    
         
            +
                end
         
     | 
| 
      
 49 
     | 
    
         
            +
              end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
              def day_number_for(tach)
         
     | 
| 
      
 52 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 53 
     | 
    
         
            +
                  tach.strftime("%e")
         
     | 
| 
      
 54 
     | 
    
         
            +
                end
         
     | 
| 
      
 55 
     | 
    
         
            +
              end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
              def abbr_day_name_for(tach)
         
     | 
| 
      
 58 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 59 
     | 
    
         
            +
                  tach.strftime("%a")
         
     | 
| 
      
 60 
     | 
    
         
            +
                end
         
     | 
| 
      
 61 
     | 
    
         
            +
              end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
              def abbr_month_and_day_for(tach)
         
     | 
| 
      
 64 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 65 
     | 
    
         
            +
                  tach.strftime("%b %d")
         
     | 
| 
      
 66 
     | 
    
         
            +
                end
         
     | 
| 
      
 67 
     | 
    
         
            +
              end
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
              def abbr_date_for(tach)
         
     | 
| 
      
 70 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 71 
     | 
    
         
            +
                  tach.strftime("%b %d, %Y")
         
     | 
| 
      
 72 
     | 
    
         
            +
                end
         
     | 
| 
      
 73 
     | 
    
         
            +
              end
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
              def abbr_date_time(tach)
         
     | 
| 
      
 76 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 77 
     | 
    
         
            +
                  tach.strftime("%b %d, %Y at %I:%M %p")
         
     | 
| 
      
 78 
     | 
    
         
            +
                end
         
     | 
| 
      
 79 
     | 
    
         
            +
              end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
              def timezone_name_for(tach)
         
     | 
| 
      
 82 
     | 
    
         
            +
                unless tach.blank?
         
     | 
| 
      
 83 
     | 
    
         
            +
                  tach.strftime("%Z")
         
     | 
| 
      
 84 
     | 
    
         
            +
                end
         
     | 
| 
      
 85 
     | 
    
         
            +
              end
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/drexed/datetime.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: drexed-datetime
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Juan Gomez
         
     | 
| 
         @@ -50,11 +50,10 @@ files: 
     | 
|
| 
       50 
50 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       51 
51 
     | 
    
         
             
            - README.md
         
     | 
| 
       52 
52 
     | 
    
         
             
            - Rakefile
         
     | 
| 
      
 53 
     | 
    
         
            +
            - app/helpers/datetime_helper.rb
         
     | 
| 
       53 
54 
     | 
    
         
             
            - drexed-datetime.gemspec
         
     | 
| 
       54 
55 
     | 
    
         
             
            - lib/drexed/datetime.rb
         
     | 
| 
       55 
56 
     | 
    
         
             
            - lib/drexed/datetime/version.rb
         
     | 
| 
       56 
     | 
    
         
            -
            - lib/drexed/datetime_helper.rb
         
     | 
| 
       57 
     | 
    
         
            -
            - lib/drexed/railtie.rb
         
     | 
| 
       58 
57 
     | 
    
         
             
            homepage: https://github.com/drexed/drexed-datetime
         
     | 
| 
       59 
58 
     | 
    
         
             
            licenses:
         
     | 
| 
       60 
59 
     | 
    
         
             
            - MIT
         
     | 
| 
         @@ -1,91 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module Drexed
         
     | 
| 
       2 
     | 
    
         
            -
              module Datetime
         
     | 
| 
       3 
     | 
    
         
            -
                module DatetimeHelper
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
                  def month_day_and_time_for(tach)
         
     | 
| 
       6 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       7 
     | 
    
         
            -
                      tach.strftime("%B %e at %I:%M %p")
         
     | 
| 
       8 
     | 
    
         
            -
                    end
         
     | 
| 
       9 
     | 
    
         
            -
                  end
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                  def date_time_for(tach)
         
     | 
| 
       12 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       13 
     | 
    
         
            -
                      tach.strftime("%B %e, %Y at %I:%M %p")
         
     | 
| 
       14 
     | 
    
         
            -
                    end
         
     | 
| 
       15 
     | 
    
         
            -
                  end
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                  def date_for(tach)
         
     | 
| 
       18 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       19 
     | 
    
         
            -
                      tach.strftime("%B %e, %Y")
         
     | 
| 
       20 
     | 
    
         
            -
                    end
         
     | 
| 
       21 
     | 
    
         
            -
                  end
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
                  def twenty_four_hour_time_for(tach)
         
     | 
| 
       24 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       25 
     | 
    
         
            -
                      tach.strftime("%H:%M")
         
     | 
| 
       26 
     | 
    
         
            -
                    end
         
     | 
| 
       27 
     | 
    
         
            -
                  end
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
                  def twelve_hour_time_for(tach)
         
     | 
| 
       30 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       31 
     | 
    
         
            -
                      tach.strftime("%I:%M %p")
         
     | 
| 
       32 
     | 
    
         
            -
                    end
         
     | 
| 
       33 
     | 
    
         
            -
                  end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                  def month_name_for(tach)
         
     | 
| 
       36 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       37 
     | 
    
         
            -
                      tach.strftime("%B")
         
     | 
| 
       38 
     | 
    
         
            -
                    end
         
     | 
| 
       39 
     | 
    
         
            -
                  end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                  def abbr_month_name_for(tach)
         
     | 
| 
       42 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       43 
     | 
    
         
            -
                      tach.strftime("%b")
         
     | 
| 
       44 
     | 
    
         
            -
                    end
         
     | 
| 
       45 
     | 
    
         
            -
                  end
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                  def day_name_for(tach)
         
     | 
| 
       48 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       49 
     | 
    
         
            -
                      tach.strftime("%A")
         
     | 
| 
       50 
     | 
    
         
            -
                    end
         
     | 
| 
       51 
     | 
    
         
            -
                  end
         
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                  def day_number_for(tach)
         
     | 
| 
       54 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       55 
     | 
    
         
            -
                      tach.strftime("%e")
         
     | 
| 
       56 
     | 
    
         
            -
                    end
         
     | 
| 
       57 
     | 
    
         
            -
                  end
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
                  def abbr_day_name_for(tach)
         
     | 
| 
       60 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       61 
     | 
    
         
            -
                      tach.strftime("%a")
         
     | 
| 
       62 
     | 
    
         
            -
                    end
         
     | 
| 
       63 
     | 
    
         
            -
                  end
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                  def abbr_month_and_day_for(tach)
         
     | 
| 
       66 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       67 
     | 
    
         
            -
                      tach.strftime("%b %d")
         
     | 
| 
       68 
     | 
    
         
            -
                    end
         
     | 
| 
       69 
     | 
    
         
            -
                  end
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
                  def abbr_date_for(tach)
         
     | 
| 
       72 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       73 
     | 
    
         
            -
                      tach.strftime("%b %d, %Y")
         
     | 
| 
       74 
     | 
    
         
            -
                    end
         
     | 
| 
       75 
     | 
    
         
            -
                  end
         
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
                  def abbr_date_time(tach)
         
     | 
| 
       78 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       79 
     | 
    
         
            -
                      tach.strftime("%b %d, %Y at %I:%M %p")
         
     | 
| 
       80 
     | 
    
         
            -
                    end
         
     | 
| 
       81 
     | 
    
         
            -
                  end
         
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
                  def timezone_name_for(tach)
         
     | 
| 
       84 
     | 
    
         
            -
                    unless tach.blank?
         
     | 
| 
       85 
     | 
    
         
            -
                      tach.strftime("%Z")
         
     | 
| 
       86 
     | 
    
         
            -
                    end
         
     | 
| 
       87 
     | 
    
         
            -
                  end
         
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
                end
         
     | 
| 
       90 
     | 
    
         
            -
              end
         
     | 
| 
       91 
     | 
    
         
            -
            end
         
     |