<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by vinit kumar on Medium]]></title>
        <description><![CDATA[Stories by vinit kumar on Medium]]></description>
        <link>https://medium.com/@vinitiias17?source=rss-7c72a0ed51d7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EnXOxKnVWNqPmJwI.jpg</url>
            <title>Stories by vinit kumar on Medium</title>
            <link>https://medium.com/@vinitiias17?source=rss-7c72a0ed51d7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 14:28:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vinitiias17/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Calculating Days Difference Using Date Range in Twig Template — Drupal 9]]></title>
            <link>https://medium.com/@vinitiias17/calculating-days-difference-using-date-range-in-twig-template-drupal-9-6cf88b5f66c2?source=rss-7c72a0ed51d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cf88b5f66c2</guid>
            <category><![CDATA[twig]]></category>
            <category><![CDATA[drupal-9]]></category>
            <category><![CDATA[drupal-development]]></category>
            <dc:creator><![CDATA[vinit kumar]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 08:14:19 GMT</pubDate>
            <atom:updated>2023-06-19T10:31:46.884Z</atom:updated>
            <content:encoded><![CDATA[<h3>Calculating Days Difference Using Date Range in Twig Template — Drupal 9</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ESV2ReIguxlMOEBE9ajWDQ.jpeg" /></figure><p>In Drupal 9, Twig templates provide powerful tools for rendering and manipulating data. In this tutorial, we will explore how to calculate the days difference between a date range using Twig templates. This will allow us to display the duration between two dates in a user-friendly format.</p><p><strong>Step 1:</strong> Enable the Date module Ensure that the Date module is enabled in your Drupal 9 installation. This module provides the necessary functions and filters to work with dates in Twig templates.</p><p><strong>Step 2:</strong> Access the Date Range Field To calculate the days difference, we need to access the start and end dates of the date range field. Assuming you have access to the node object, you can access the date range field like this: node.field_date_range. Modify the field name accordingly to match your Drupal setup.</p><p><strong>Step 3:</strong> Calculate the Days Difference In your Twig template file, you can use the following code to calculate the days difference:</p><pre>{% if node.field_date_range.value %}<br>    {% set startDate = node.field_date_range.start_value %}<br>    {% set endDate = node.field_date_range.end_value %}<br>    <br>    {% set daysDifference = ((endDate|date(&#39;U&#39;) - startDate|date(&#39;U&#39;)) / 86400)|round %}<br>    <br>    The number of days difference between the date range is: {{ daysDifference }}<br>{% endif %}</pre><h3>Explanation:</h3><ul><li>We check if the date range field has a value using {% if node.field_date_range.value %}.</li><li>If the field has a value, we extract the start and end dates using {% set startDate = node.field_date_range.start_value %} and {% set endDate = node.field_date_range.end_value %}.</li><li>We calculate the difference in seconds between the end and start dates by subtracting the start date timestamp from the end date timestamp.</li><li>Next, we divide the difference by the number of seconds in a day (86400) and round it using the |round filter to obtain the number of days.</li><li>Finally, we display the days difference using {{ daysDifference }}.</li></ul><p>Conclusion: By following these steps, you can easily calculate the days difference between a date range using Twig templates in Drupal 9. This allows you to present duration information to your users in a clear and concise manner. With the power of Drupal’s Date module and Twig templates, you can handle date-related calculations and display requirements with ease.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cf88b5f66c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zurb Foundation 6 — Advance Frontend Framework]]></title>
            <link>https://medium.com/@vinitiias17/zurb-foundation-6-advance-frontend-framework-a4f236c92ef1?source=rss-7c72a0ed51d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4f236c92ef1</guid>
            <category><![CDATA[zurb]]></category>
            <category><![CDATA[responsive-web-design]]></category>
            <category><![CDATA[grid-system]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[vinit kumar]]></dc:creator>
            <pubDate>Thu, 11 Apr 2019 13:47:06 GMT</pubDate>
            <atom:updated>2019-04-11T13:47:06.360Z</atom:updated>
            <content:encoded><![CDATA[<h3>Zurb Foundation 6 — Advance Frontend Framework</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYlPcjy1QJIk3Ohc_-8lXg.png" /><figcaption>Zurb Foundation 6</figcaption></figure><p>In upcoming days, frontend development is going more advance and community is providing lots of framework to help the developer to optimise their work and time to establish accurate skeleton/prototype for a website.</p><p>There are many frameworks, but in my view generally, I preferred Zurb Foundation over all frameworks. This framework frequently comes with new releases and latest features. Advance grid system and some new feature component are of them.</p><p>This also support CMS like <a href="https://www.drupal.org/project/zurb_foundation">Drupal</a>.</p><p>Let’s take an overview of the <strong>latest grid system</strong> and <strong>feature component</strong> that zurb foundation provides us for fast and accurate prototyping.</p><p><strong>Zurb Foundation 6 Grid Layout</strong></p><p><a href="https://foundation.zurb.com/">Zurb foundation 6</a> provides 3 types of grid structure layout.</p><ol><li><a href="https://foundation.zurb.com/sites/docs/xy-grid.html">X-Y Grid</a> : The XY grid works very similarly to the standard float grid, but includes a number of useful features only possible with Flexbox, like horizontal and vertical alignment, automatic sizing and a <strong>full vertical grid</strong>.</li><li><a href="https://foundation.zurb.com/sites/docs/flex-grid.html">Flex Grid</a> : The flex grid works very similarly to the standard float grid, but includes a number of useful features only possible with flexbox, like horizontal and vertical alignment, automatic sizing, and easier source ordering.</li><li><a href="https://foundation.zurb.com/sites/docs/grid.html">Float Grid</a> : <em>powerful multi-device layouts quickly and easily with the default 12-column, nestable Foundation grid. </em>This is based on css float property and very first grid layout structure</li></ol><blockquote><strong>X-Y Grid</strong></blockquote><blockquote>A fully reworked new grid system in v6.4 which has all the variety inbuilt in the form of multiple grid types which includes margin grid, padding grid, frame grid, block grid and vertical grid.</blockquote><p><strong>Zurb Foundation Advance Components.</strong></p><ol><li><a href="https://foundation.zurb.com/sites/docs/table.html#stacked-table">Stack Table</a> : <em>This is very much useful for responsive website.</em> Some times making table scrollable in mobile don’t give nice experience to user. Stack table looks great in visuals with specific content.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*W9BG4aOQywKdPQt12H4k4w.png" /><figcaption>Table in desktop</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*XCh7CEkY_u1SUErsvDrKjQ.png" /><figcaption>Stack Table in mobile</figcaption></figure><ol><li><a href="https://foundation.zurb.com/sites/docs/responsive-accordion-tabs.html">Responsive Accordion Tabs</a> : <em>Either the </em><a href="https://foundation.zurb.com/sites/docs/accordion.html"><em>Accordion Markup</em></a><em> or the </em><a href="https://foundation.zurb.com/sites/docs/tabs.html"><em>Tabs Markup</em></a><em> can be used to responsively switch between the two components at different breakpoints. </em>This component can be very useful for responsive layout, as sometimes we have multiple tabs that is not going to adjust in mobile devices, hence , this tab will switched to accordion tabs.</li><li><a href="https://foundation.zurb.com/sites/docs/off-canvas.html">Off-canvas</a> : <em>Off-canvas panels are positioned outside of the viewport and slide in when activated. </em>Most of the framework doesn’t provide this feature. we have 4 side Off-canvas container in Zurb foundation and easy to implement.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*DgKRQ93oPjSL6Yf4pfHjJw.gif" /></figure><p>Zurb foundation has lot more of that. Take an overview and start prototyping with zurb.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4f236c92ef1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>