{"id":40380,"date":"2025-11-19T05:37:48","date_gmt":"2025-11-19T05:37:48","guid":{"rendered":"https:\/\/www.railscarma.com\/?p=40380"},"modified":"2026-01-01T04:02:58","modified_gmt":"2026-01-01T04:02:58","slug":"how-to-create-and-work-with-date-objects-in-ruby-on-rails","status":"publish","type":"post","link":"https:\/\/www.railscarma.com\/fr\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/","title":{"rendered":"How to Create and Work With Date Objects in Ruby on Rails"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"40380\" class=\"elementor elementor-40380\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5015d48 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5015d48\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-38e2a91\" data-id=\"38e2a91\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-691ac71 elementor-widget elementor-widget-text-editor\" data-id=\"691ac71\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">Handling dates is one of the most essential tasks in any real-world Ruby on Rails application. From storing birthdays and appointment times to generating reports and scheduling automated jobs, date and time manipulation is everywhere. Fortunately, Rails provides a clean, developer-friendly interface for creating, formatting, manipulating, and storing <\/span><b>Date<\/b><span style=\"font-weight: 400;\">, <\/span><b>Time<\/b><span style=\"font-weight: 400;\">, et <\/span><b>DateTime<\/b><span style=\"font-weight: 400;\"> objects.<\/span><\/p><p><span style=\"font-weight: 400;\">This article offers a complete, practical guide on <\/span><b>how to create and work with date objects in Ruby on Rails<\/b><span style=\"font-weight: 400;\">. Whether you are a beginner building your first Rails project or an experienced developer looking to sharpen your date-handling skills, this guide covers everything you need.<\/span><\/p><h2><b>Why Dates Matter in Rails Applications<\/b><\/h2><p><span style=\"font-weight: 400;\">Before diving into the how-to, it&#8217;s important to understand why date-handling is so important:<\/span><\/p><ul><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Applications often rely on time-based logic: subscriptions, reminders, event scheduling, analytics, and more.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Databases store dates in specific formats, so converting between Ruby and SQL types requires attention.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Handling time zones incorrectly can cause subtle bugs in production.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Dates influence UI components, filters, searches, and reporting tools.<\/span><\/li><\/ul><p><span style=\"font-weight: 400;\">Rails simplifies much of this complexity with a powerful set of tools for creating, parsing, and manipulating dates.<\/span><\/p><h3><b>1. Creating Date Objects in Rails<\/b><\/h3><p><span style=\"font-weight: 400;\">Rails uses Ruby\u2019s built-in <\/span><span style=\"font-weight: 400;\"><code>Date<\/code><\/span><span style=\"font-weight: 400;\"> class, enhanced by Rails\u2019 ActiveSupport extensions. Here are several common ways to create date objects.<\/span><\/p><h4><b>1.1 Using <\/b><b><code>Date.new<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\">The most straightforward way to create a date is by specifying year, month, and day.<\/span><\/p><p><span style=\"font-weight: 400;\"><code>date = Date.new(2026, 3, 15)<\/code><br \/><\/span><span style=\"font-weight: 400;\"><code># =&gt; #&lt;Date: 2026-03-15&gt;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">This is ideal when you already have the individual components.<\/span><\/p><h4><b>1.2 Using <\/b><b><code>Date.today<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\">To get the current date:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>today = Date.today<\/code><br \/><\/span><span style=\"font-weight: 400;\"><code># =&gt; #&lt;Date: 2026-11-17&gt;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">This returns the date in the server\u2019s default time zone.<\/span><\/p><h4><b>1.3 Using <\/b><b><code>Date.parse<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\">When you have a string:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>date = Date.parse(\"2026-02-10\")<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Or even natural-language formats:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>date = Date.parse(\"10 Feb 2026\")<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Be cautious\u2014<\/span><span style=\"font-weight: 400;\"><code>parse<\/code><\/span><span style=\"font-weight: 400;\"> tries to guess the format and may interpret ambiguous dates differently depending on locale.<\/span><\/p><h4><b>1.4 Using Rails&#8217; <\/b><b><code>to_date<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\">Rails extends string classes with <\/span><span style=\"font-weight: 400;\">to_date<\/span><span style=\"font-weight: 400;\">:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>\"2026-12-05\".to_date<\/code><br \/><\/span><span style=\"font-weight: 400;\"><code>\"December 5, 2026\".to_date<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">This is cleaner and safer when working with user input or form fields.<\/span><\/p><h3><strong>2. Working With Date and Time in Rails Models<\/strong><\/h3><p><span style=\"font-weight: 400;\">Rails applications frequently use <\/span><span style=\"font-weight: 400;\"><code>date<\/code><\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\"><code>datetime<\/code><\/span><span style=\"font-weight: 400;\">ou <\/span><span style=\"font-weight: 400;\"><code>timestamp<\/code><\/span><span style=\"font-weight: 400;\"> database fields. When you generate a model:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>rails g model Event title:string start_date:date start_time:datetime<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Rails automatically maps these to <\/span><span style=\"font-weight: 400;\"><code>Date<\/code><\/span><span style=\"font-weight: 400;\"> et <\/span><span style=\"font-weight: 400;\"><code>ActiveSupport::TimeWithZone<\/code><\/span><span style=\"font-weight: 400;\"> objects.<\/span><\/p><p><span style=\"font-weight: 400;\">Exemple:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>event = Event.new(start_date: Date.today)<br \/><\/code><\/span><span style=\"font-weight: 400;\"><code>event.save<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Ou:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>event.start_time = Time.zone.now<\/code><\/span><\/p><h3><b>3. Understanding Rails Time Zones<\/b><\/h3><p><span style=\"font-weight: 400;\">One of the most important concepts in Rails is <\/span><b>Time Zone handling<\/b><span style=\"font-weight: 400;\">.<\/span><\/p><p><span style=\"font-weight: 400;\">Rails uses:<\/span><\/p><ul><li><b>Date<\/b><span style=\"font-weight: 400;\"> for date-only values<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Time<\/b><span style=\"font-weight: 400;\"> ou <\/span><b>DateTime<\/b><span style=\"font-weight: 400;\"> internally<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>ActiveSupport::TimeWithZone<\/b><span style=\"font-weight: 400;\"> as the preferred time representation<\/span><\/li><\/ul><p><span style=\"font-weight: 400;\">To set the application-wide time zone:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>config\/application.rb<br \/><\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>config.time_zone = \"Asia\/Kolkata\"<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>config.active_record.default_timezone = :local<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Now:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Time.zone.now<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Returns a time object already adjusted to your configured zone.<\/span><\/p><h3><strong>4. Useful Date Methods in Rails<\/strong><\/h3><p><span style=\"font-weight: 400;\">Rails enriches date handling with dozens of helper methods:<\/span><\/p><h4><b>4.1 <\/b><b><code>beginning_of_day<\/code><\/b><b> et <\/b><b><code>end_of_day<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\"><code>Date.today.beginning_of_day<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.today.end_of_day<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Great for filtering records within a date range<\/span><\/p><h4><b>4.2 <\/b><b><code>beginning_of_month<\/code><\/b><b> et <\/b><b><code>end_of_month<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\"><code>Date.today.beginning_of_month<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.today.end_of_month<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Useful for monthly reports or billing periods.<\/span><\/p><h4><b>4.3 <\/b><b><code>next_day<\/code><\/b><b> et <\/b><b><code>prev_day<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\"><code>Date.today.next_day \u00a0 # tomorrow<br \/><\/code><\/span><span style=\"font-weight: 400;\"><code>Date.today.prev_day \u00a0 # yesterday<\/code><\/span><\/p><h4><b>4.4 Adding or subtracting days<\/b><\/h4><p><span style=\"font-weight: 400;\"><code>Date.today + 7 \u00a0 \u00a0 # one week later<\/code><br \/><\/span><span style=\"font-weight: 400;\"><code>Date.today - 30\u00a0 \u00a0 # 30 days earlier<\/code><\/span><\/p><h4><b>4.5 Creating ranges<\/b><\/h4><p><span style=\"font-weight: 400;\">Date ranges are incredibly useful in Rails queries:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>(start_date..end_date)<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Exemple:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Order.where(created_at:<br \/><\/code><\/span><span style=\"font-weight: 400;\"><code> Date.today.beginning_of_month..Date.today.end_of_month)<\/code><\/span><\/p><h3><b>5. Formatting Date Objects<\/b><\/h3><p><span style=\"font-weight: 400;\">Rails supports multiple ways to format dates.<\/span><\/p><h4><b>5.1 Using <\/b><b><code>strftime<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\">Ruby\u2019s classic formatter:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.today.strftime(\"%d-%m-%Y\")<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code># =&gt; \"17-11-2026\"<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Common tokens:<\/span><\/p><table><tbody><tr><td><b>Token<\/b><\/td><td><b>Description<\/b><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>%Y<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Full year<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>%m<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Month (01\u201312)<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>%d<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Day (01\u201331)<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>%B<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Full month name<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>%A<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Weekday name<\/span><\/td><\/tr><\/tbody><\/table><h4><b>5.2 Rails Built-in Formats<\/b><\/h4><p><span style=\"font-weight: 400;\">Rails includes pre-defined formats:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.today.to_s(:long)\u00a0 \u00a0 \u00a0 # \"November 17, 2026\"<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.today.to_s(:short) \u00a0 \u00a0 # \"17 Nov\"<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">You can even create custom formats in:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>config\/initializers\/time_formats.rb<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date::DATE_FORMATS[:custom] = \"%B %d, %Y\"<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Then use:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.today.to_s(:custom)<\/code><\/span><\/p><h3><b>6. Working With Dates in Rails Forms<\/b><\/h3><p><span style=\"font-weight: 400;\">Rails form helpers automatically convert fields to date objects.<\/span><\/p><p><span style=\"font-weight: 400;\"><code>&lt;%= form.date_select :birthday %&gt;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">This generates dropdowns for year, month, and day.<\/span><\/p><p><span style=\"font-weight: 400;\">You can also use:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>&lt;%= form.date_field :start_date %&gt;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Which creates an HTML5 date picker.<\/span><\/p><p><span style=\"font-weight: 400;\">When submitted, Rails parses and assigns the value as a <\/span><span style=\"font-weight: 400;\"><code>Date<\/code><\/span><span style=\"font-weight: 400;\"> object.<\/span><\/p><h3><b>7. Comparing Dates in Rails<\/b><\/h3><p><span style=\"font-weight: 400;\">Date comparisons are straightforward:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>if Date.today &gt; Date.new(2026, 1, 1)<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0<code>puts \"We are past January 2026\"<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>fin<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">Other examples:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.today.between?(Date.yesterday, Date.tomorrow)<\/code><\/span><\/p><h3><b>8. Converting Between Date, Time, and DateTime<\/b><\/h3><p><span style=\"font-weight: 400;\">You often need to convert between types.<\/span><\/p><h4><b>8.1 Date \u2192 DateTime<\/b><\/h4><p><span style=\"font-weight: 400;\"><code>date.to_datetime<\/code><\/span><\/p><h4><b>8.2 Date \u2192 Time<\/b><\/h4><p><span style=\"font-weight: 400;\"><code>date.to_time<\/code><\/span><\/p><h4><b>8.3 Time \u2192 Date<\/b><\/h4><p><span style=\"font-weight: 400;\"><code>time.to_date<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">This is common when grouping records by day:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Order.group(\"DATE(created_at)\").count<\/code><\/span><\/p><h3><b>9. Parsing Dates From User Input<\/b><\/h3><p><span style=\"font-weight: 400;\">User-provided dates often come in unpredictable formats. Rails\u2019 <\/span><span style=\"font-weight: 400;\">to_date<\/span><span style=\"font-weight: 400;\"> handles most cases safely.<\/span><\/p><p><span style=\"font-weight: 400;\"><code>params[:start_date].to_date<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">For ambiguous formats:<\/span><\/p><p><span style=\"font-weight: 400;\"><code>Date.strptime(\"17\/11\/2026\", \"%d\/%m\/%Y\")<\/code><\/span><\/p><h3><b>10. Best Practices for Working With Dates in Rails<\/b><\/h3><h4><b>\u2714 Always use <\/b><b><code>Time.zone.now<\/code><\/b><b> au lieu de <\/b><b><code>Time.now<\/code><\/b><\/h4><p><span style=\"font-weight: 400;\">This ensures your app respects the configured time zone.<\/span><\/p><h4><b>\u2714 Use database <\/b><b><code>date<\/code><\/b><b> columns for date-only values<\/b><\/h4><p><span style=\"font-weight: 400;\">Example: birthdays, deadlines, schedules.<\/span><\/p><h4><b>\u2714 Avoid storing date strings<\/b><\/h4><p><span style=\"font-weight: 400;\">Always convert to <\/span><span style=\"font-weight: 400;\"><code>Date<\/code><\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\"><code>Time<\/code><\/span><span style=\"font-weight: 400;\">ou <\/span><span style=\"font-weight: 400;\"><code>DateTime<\/code><\/span><span style=\"font-weight: 400;\">.<\/span><\/p><h4><b>\u2714 Prefer ActiveSupport helpers<\/b><\/h4><p><span style=\"font-weight: 400;\">Rails gives you cleaner and safer methods.<\/span><\/p><h4><b>\u2714 Use range queries for filtering<\/b><\/h4><p><span style=\"font-weight: 400;\">They are efficient and readable.<\/span><\/p><h2><b>Conclusion<\/b><\/h2><p><span style=\"font-weight: 400;\">Creating and working with date objects in Ruby on Rails is simpler than it looks\u2014once you understand the tools Rails provides. Whether you\u2019re handling database fields, building forms, parsing user input, or generating reports, Rails gives you a rich set of methods to manipulate dates cleanly and effectively.<\/span><\/p><p><span style=\"font-weight: 400;\">By leveraging Rails\u2019 built-in helpers, ActiveSupport enhancements, and time-zone-aware utilities, you can avoid common pitfalls and ensure your application behaves predictably in any environment.<\/span><\/p><p><span style=\"font-weight: 400;\">If you are looking to build powerful, scalable Rails applications with clean and reliable date-handling logic, partnering with an experienced <\/span><a href=\"https:\/\/www.railscarma.com\/fr\"><b>Soci\u00e9t\u00e9 de d\u00e9veloppement Ruby on Rails<\/b><\/a><span style=\"font-weight: 400;\"> can accelerate your success. <\/span><a href=\"https:\/\/www.railscarma.com\/fr\"><b>RailsCarma<\/b><\/a><span style=\"font-weight: 400;\">, known for its deep expertise in Ruby on Rails development, helps businesses build high-performance, maintainable, and future-ready Rails applications. Their seasoned engineers ensure best practices, optimized architecture, and elegant solutions\u2014making them a trusted partner for your next Rails project.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t  <div class=\"related-post slider\">\r\n        <div class=\"headline\">Articles Similaires<\/div>\r\n    <div class=\"post-list owl-carousel\">\r\n\r\n            <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Qu&#039;est-ce que Offliberty Ruby Gem et comment fonctionne-t-il ?\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/quest-ce-que-offliberty-ruby-gem-et-comment-fonctionne-t-il\/?related_post_from=41304\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Offliberty Ruby Gem\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Qu&#039;est-ce que Offliberty Ruby Gem et comment fonctionne-t-il ?\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/quest-ce-que-offliberty-ruby-gem-et-comment-fonctionne-t-il\/?related_post_from=41304\">\r\n        Qu'est-ce que Offliberty Ruby Gem et comment fonctionne-t-il ?  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"M\u00e9thode Rails link_to : Le guide complet avec des exemples\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/rails-link_to-method-the-complete-guide-with-examples\/?related_post_from=41296\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Rails-link_to-Method-The-Complete-Guide-with-Examples.png\" class=\"attachment-full size-full wp-post-image\" alt=\"M\u00e9thode Rails link_to\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Rails-link_to-Method-The-Complete-Guide-with-Examples.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Rails-link_to-Method-The-Complete-Guide-with-Examples-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Rails-link_to-Method-The-Complete-Guide-with-Examples-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Rails-link_to-Method-The-Complete-Guide-with-Examples-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"M\u00e9thode Rails link_to : Le guide complet avec des exemples\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/rails-link_to-method-the-complete-guide-with-examples\/?related_post_from=41296\">\r\n        M\u00e9thode Rails link_to : Le guide complet avec des exemples  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Comment construire une plateforme SaaS \u00e9volutive en utilisant Ruby on Rails\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/how-to-build-a-scalable-saas-platform-using-ruby-on-rails\/?related_post_from=41273\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Construire une plateforme SaaS avec Ruby on Rails\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Comment construire une plateforme SaaS \u00e9volutive en utilisant Ruby on Rails\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/how-to-build-a-scalable-saas-platform-using-ruby-on-rails\/?related_post_from=41273\">\r\n        Comment construire une plateforme SaaS \u00e9volutive en utilisant Ruby on Rails  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Guide de correspondance des expressions rationnelles en Ruby (2026) avec exemples\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/ruby-regex-match-guide-with-examples\/?related_post_from=41249\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Ruby-Regex-Match-Guide-with-Examples.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Ruby Regex Match\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Ruby-Regex-Match-Guide-with-Examples.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Ruby-Regex-Match-Guide-with-Examples-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Ruby-Regex-Match-Guide-with-Examples-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Ruby-Regex-Match-Guide-with-Examples-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Guide de correspondance des expressions rationnelles en Ruby (2026) avec exemples\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/ruby-regex-match-guide-with-examples\/?related_post_from=41249\">\r\n        Guide de correspondance des expressions rationnelles en Ruby (2026) avec exemples  <\/a>\r\n\r\n        <\/div>\r\n      \r\n  <\/div>\r\n\r\n  <script>\r\n      <\/script>\r\n  <style>\r\n    .related-post {}\r\n\r\n    .related-post .post-list {\r\n      text-align: left;\r\n          }\r\n\r\n    .related-post .post-list .item {\r\n      margin: 10px;\r\n      padding: 10px;\r\n          }\r\n\r\n    .related-post .headline {\r\n      font-size: 14px !important;\r\n      color: #999999 !important;\r\n          }\r\n\r\n    .related-post .post-list .item .post_thumb {\r\n      max-height: 220px;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n          }\r\n\r\n    .related-post .post-list .item .post_title {\r\n      font-size: 14px;\r\n      color: #000000;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .post-list .item .post_excerpt {\r\n      font-size: 12px;\r\n      color: #3f3f3f;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .owl-dots .owl-dot {\r\n          }\r\n\r\n      <\/style>\r\n      <script>\r\n      jQuery(document).ready(function($) {\r\n        $(\".related-post .post-list\").owlCarousel({\r\n          items: 2,\r\n          responsiveClass: true,\r\n          responsive: {\r\n            0: {\r\n              items: 1,\r\n            },\r\n            768: {\r\n              items: 2,\r\n            },\r\n            1200: {\r\n              items: 2,\r\n            }\r\n          },\r\n                      rewind: true,\r\n                                loop: true,\r\n                                center: false,\r\n                                autoplay: true,\r\n            autoplayHoverPause: true,\r\n                                nav: true,\r\n            navSpeed: 1000,\r\n            navText: ['<i class=\"fas fa-chevron-left\"><\/i>', '<i class=\"fas fa-chevron-right\"><\/i>'],\r\n                                dots: false,\r\n            dotsSpeed: 1200,\r\n                                                    rtl: false,\r\n          \r\n        });\r\n      });\r\n    <\/script>\r\n  <\/div>","protected":false},"excerpt":{"rendered":"<p>Handling dates is one of the most essential tasks in any real-world Ruby on Rails application. From storing birthdays and appointment times to generating reports and scheduling automated jobs, date and time manipulation is everywhere. Fortunately, Rails provides a clean, developer-friendly interface for creating, formatting, manipulating, and storing Date, Time, and DateTime objects. This article &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/ruby-regex-match-guide-with-examples\/\"> <span class=\"screen-reader-text\">Guide de correspondance des expressions rationnelles en Ruby (2026) avec exemples<\/span> Lire la suite \u00bb<\/a><\/p>","protected":false},"author":5,"featured_media":40435,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1224],"tags":[],"class_list":["post-40380","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create and Work With Date Objects in Ruby on Rails - RailsCarma - Ruby on Rails Development Company specializing in Offshore Development<\/title>\n<meta name=\"description\" content=\"Learn how to create, manage, and manipulate date objects in Ruby on Rails with practical methods, tips, and examples for real-world apps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.railscarma.com\/fr\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create and Work With Date Objects in Ruby on Rails - RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\" \/>\n<meta property=\"og:description\" content=\"Learn how to create, manage, and manipulate date objects in Ruby on Rails with practical methods, tips, and examples for real-world apps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.railscarma.com\/fr\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/\" \/>\n<meta property=\"og:site_name\" content=\"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RailsCarma\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-19T05:37:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-01T04:02:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nikhil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@railscarma\" \/>\n<meta name=\"twitter:site\" content=\"@railscarma\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nikhil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/\"},\"author\":{\"name\":\"Nikhil\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c\"},\"headline\":\"How to Create and Work With Date Objects in Ruby on Rails\",\"datePublished\":\"2025-11-19T05:37:48+00:00\",\"dateModified\":\"2026-01-01T04:02:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/\"},\"wordCount\":790,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.railscarma.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png\",\"articleSection\":[\"Blogs\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/\",\"url\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/\",\"name\":\"How to Create and Work With Date Objects in Ruby on Rails - RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png\",\"datePublished\":\"2025-11-19T05:37:48+00:00\",\"dateModified\":\"2026-01-01T04:02:58+00:00\",\"description\":\"Learn how to create, manage, and manipulate date objects in Ruby on Rails with practical methods, tips, and examples for real-world apps.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage\",\"url\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png\",\"contentUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png\",\"width\":800,\"height\":300,\"caption\":\"Date Objects in Ruby on Rails\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.railscarma.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create and Work With Date Objects in Ruby on Rails\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.railscarma.com\/#website\",\"url\":\"https:\/\/www.railscarma.com\/\",\"name\":\"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\",\"description\":\"RailsCarma is a Ruby on Rails Development Company in Bangalore. We specialize in Offshore Ruby on Rails Development based out in USA and India. Hire experienced Ruby on Rails developers for the ultimate Web Experience.\",\"publisher\":{\"@id\":\"https:\/\/www.railscarma.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.railscarma.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.railscarma.com\/#organization\",\"name\":\"RailsCarma\",\"url\":\"https:\/\/www.railscarma.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png\",\"contentUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png\",\"width\":200,\"height\":46,\"caption\":\"RailsCarma\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RailsCarma\/\",\"https:\/\/x.com\/railscarma\",\"https:\/\/www.linkedin.com\/company\/railscarma\/\",\"https:\/\/myspace.com\/railscarma\",\"https:\/\/in.pinterest.com\/railscarma\/\",\"https:\/\/www.youtube.com\/channel\/UCx3Wil-aAnDARuatTEyMdpg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c\",\"name\":\"Nikhil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g\",\"caption\":\"Nikhil\"},\"sameAs\":[\"https:\/\/www.railscarma.com\/hire-ruby-on-rails-developer\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create and Work With Date Objects in Ruby on Rails - RailsCarma - Ruby on Rails Development Company specializing in Offshore Development","description":"Learn how to create, manage, and manipulate date objects in Ruby on Rails with practical methods, tips, and examples for real-world apps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.railscarma.com\/fr\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/","og_locale":"fr_FR","og_type":"article","og_title":"How to Create and Work With Date Objects in Ruby on Rails - RailsCarma - Ruby on Rails Development Company specializing in Offshore Development","og_description":"Learn how to create, manage, and manipulate date objects in Ruby on Rails with practical methods, tips, and examples for real-world apps.","og_url":"https:\/\/www.railscarma.com\/fr\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/","og_site_name":"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development","article_publisher":"https:\/\/www.facebook.com\/RailsCarma\/","article_published_time":"2025-11-19T05:37:48+00:00","article_modified_time":"2026-01-01T04:02:58+00:00","og_image":[{"width":800,"height":300,"url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png","type":"image\/png"}],"author":"Nikhil","twitter_card":"summary_large_image","twitter_creator":"@railscarma","twitter_site":"@railscarma","twitter_misc":{"\u00c9crit par":"Nikhil","Dur\u00e9e de lecture estim\u00e9e":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#article","isPartOf":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/"},"author":{"name":"Nikhil","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c"},"headline":"How to Create and Work With Date Objects in Ruby on Rails","datePublished":"2025-11-19T05:37:48+00:00","dateModified":"2026-01-01T04:02:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/"},"wordCount":790,"commentCount":0,"publisher":{"@id":"https:\/\/www.railscarma.com\/#organization"},"image":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png","articleSection":["Blogs"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/","url":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/","name":"How to Create and Work With Date Objects in Ruby on Rails - RailsCarma - Ruby on Rails Development Company specializing in Offshore Development","isPartOf":{"@id":"https:\/\/www.railscarma.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage"},"image":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png","datePublished":"2025-11-19T05:37:48+00:00","dateModified":"2026-01-01T04:02:58+00:00","description":"Learn how to create, manage, and manipulate date objects in Ruby on Rails with practical methods, tips, and examples for real-world apps.","breadcrumb":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#primaryimage","url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png","contentUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/11\/How-to-Create-and-Work-With-Date-Objects-in-Ruby-on-Rails.png","width":800,"height":300,"caption":"Date Objects in Ruby on Rails"},{"@type":"BreadcrumbList","@id":"https:\/\/www.railscarma.com\/blog\/how-to-create-and-work-with-date-objects-in-ruby-on-rails\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.railscarma.com\/"},{"@type":"ListItem","position":2,"name":"How to Create and Work With Date Objects in Ruby on Rails"}]},{"@type":"WebSite","@id":"https:\/\/www.railscarma.com\/#website","url":"https:\/\/www.railscarma.com\/","name":"RailsCarma - Soci\u00e9t\u00e9 de d\u00e9veloppement Ruby on Rails sp\u00e9cialis\u00e9e dans le d\u00e9veloppement offshore","description":"RailsCarma est une soci\u00e9t\u00e9 de d\u00e9veloppement Ruby on Rails \u00e0 Bangalore. Nous sommes sp\u00e9cialis\u00e9s dans le d\u00e9veloppement offshore Ruby on Rails, bas\u00e9s aux \u00c9tats-Unis et en Inde. Embauchez des d\u00e9veloppeurs Ruby on Rails exp\u00e9riment\u00e9s pour une exp\u00e9rience Web ultime.","publisher":{"@id":"https:\/\/www.railscarma.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.railscarma.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.railscarma.com\/#organization","name":"RailsCarma","url":"https:\/\/www.railscarma.com\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png","contentUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png","width":200,"height":46,"caption":"RailsCarma"},"image":{"@id":"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RailsCarma\/","https:\/\/x.com\/railscarma","https:\/\/www.linkedin.com\/company\/railscarma\/","https:\/\/myspace.com\/railscarma","https:\/\/in.pinterest.com\/railscarma\/","https:\/\/www.youtube.com\/channel\/UCx3Wil-aAnDARuatTEyMdpg"]},{"@type":"Person","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c","name":"Nikhil","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g","caption":"Nikhil"},"sameAs":["https:\/\/www.railscarma.com\/hire-ruby-on-rails-developer\/"]}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/posts\/40380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/comments?post=40380"}],"version-history":[{"count":0,"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/posts\/40380\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/media\/40435"}],"wp:attachment":[{"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/media?parent=40380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/categories?post=40380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.railscarma.com\/fr\/wp-json\/wp\/v2\/tags?post=40380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}