<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Technological Ramblings</title>
    <link>https://paper.wf/technological-ramblings/</link>
    <description></description>
    <pubDate>Sun, 05 Apr 2026 18:52:22 +0000</pubDate>
    <item>
      <title>Programming Kata - D-1 Processing</title>
      <link>https://paper.wf/technological-ramblings/programming-kata-d-1-processing</link>
      <description>&lt;![CDATA[I&#39;ve encountered this problem in a previous job and thought it can be interesting for practice.&#xA;&#xA;Description&#xA;&#xA;Create a program or function the receives a Date (or gets the current one) and prints/returns a time range dependent on which week-day.!--more-- The range should begin at the start of the previous work-day and end at the beginning of the received date (not inclusive), is such that:&#xA;&#xA;| Week-day  | Result                                          |&#xA;|-----------|-------------------------------------------------|&#xA;| Sunday    | null/empty/[]                               |&#xA;| Monday    | [Previous Friday 00:00 - Previous Sunday 24:00) |&#xA;| Tuesday   | [Previous Monday 00:00 - 24:00)                 |&#xA;| Wednesday | [Previous Tuesday 00:00 - 24:00)                |&#xA;| Thursday  | [Previous Wednesday 00:00 - 24:00)              |&#xA;| Friday    | [Previous Thursday 00:00 - 24:00)               |&#xA;| Saturday  | null/empty/[]                               |&#xA;&#xA;(The ) represents a [closed-open interval)&#xA;&#xA;Extension&#xA;&#xA;Connect to a database or service to retrieve a list of holidays, and treat them the same as weekend days.]]&gt;</description>
      <content:encoded><![CDATA[<p>I&#39;ve encountered this problem in a previous job and thought it can be interesting for practice.</p>

<h2 id="description" id="description">Description</h2>

<p>Create a program or function the receives a Date (or gets the current one) and prints/returns a time range dependent on which week-day. The range should begin at the start of the previous work-day and end at the beginning of the received date (not inclusive), is such that:</p>

<table>
<thead>
<tr>
<th>Week-day</th>
<th>Result</th>
</tr>
</thead>

<tbody>
<tr>
<td>Sunday</td>
<td><code>null</code>/<code>empty</code>/[]</td>
</tr>

<tr>
<td>Monday</td>
<td>[Previous Friday 00:00 – Previous Sunday 24:00)</td>
</tr>

<tr>
<td>Tuesday</td>
<td>[Previous Monday 00:00 – 24:00)</td>
</tr>

<tr>
<td>Wednesday</td>
<td>[Previous Tuesday 00:00 – 24:00)</td>
</tr>

<tr>
<td>Thursday</td>
<td>[Previous Wednesday 00:00 – 24:00)</td>
</tr>

<tr>
<td>Friday</td>
<td>[Previous Thursday 00:00 – 24:00)</td>
</tr>

<tr>
<td>Saturday</td>
<td><code>null</code>/<code>empty</code>/[]</td>
</tr>
</tbody>
</table>

<p>(The <code>[)</code> represents a <a href="https://fhur.me/posts/always-use-closed-open-intervals" rel="nofollow">closed-open interval</a>)</p>

<h2 id="extension" id="extension">Extension</h2>

<p>Connect to a database or service to retrieve a list of holidays, and treat them the same as weekend days.</p>
]]></content:encoded>
      <guid>https://paper.wf/technological-ramblings/programming-kata-d-1-processing</guid>
      <pubDate>Wed, 05 Jun 2024 19:56:12 +0000</pubDate>
    </item>
  </channel>
</rss>