### Install YMD Gem Source: https://github.com/tbonz/ymd/blob/master/README.md Instructions for installing the YMD gem using Bundler or directly via the gem command. ```ruby gem 'ymd' ``` ```bash $ bundle $ gem install ymd ``` -------------------------------- ### Format Current Date with YMD Gem Source: https://github.com/tbonz/ymd/blob/master/README.md Demonstrates default usage of the YMD gem to format the current date. It also shows how to specify different separators like '_' or '-'. ```ruby # default usage (current date) YMD.ymd # => "20191231" # output date with '_' separator YMD.ymd('_') # => "2019_12_31" # output date with '-' separator YMD.ymd('-') # => "2019-12-31" ``` -------------------------------- ### Format Specific Date with YMD Gem Source: https://github.com/tbonz/ymd/blob/master/README.md Shows how to format a specific date object using the YMD gem, including options for separators. It works with Date, DateTime, and Time objects. ```ruby # with a specific Date object YMD.ymd(date: Date.new(2023, 12, 25)) # => "20231225" # with a Date object and separator YMD.ymd('-', date: Date.new(2023, 12, 25)) # => "2023-12-25" # works with DateTime and Time objects too YMD.ymd(date: DateTime.now) YMD.ymd('/', date: Time.now) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.