Merl's Blog

Next Week

I recently talked about the Weekly page, and since it is new I am certain this will not be the last time.

One of the new changes we wanted was to make it also display next week.

Of course all the weeks before are present, along with last week and this week, but I need to help highlight next week. We do this to help display the stories that are in progress, or stashed away for later.

Slowly but surely I think I am getting more comfortable on the front end. I need to hone my skills on the back end a little more to be well-rounded.

Regardless I am working on this now.

I had to find the place where the weeks were chosen and how they were.

JS/Date.

One thing I noticed is the time is measured interestingly. Of course, it makes sense that the time should be precise and in a manner that is readable to computers but the first time you see it, it is strange.

2024-07-31T17:13:00.000Z

What? Of course, it turns in to something readable like this

2024-07-31, 17:13

It is important to keep this type of format or else nothing will work.

(defn starts-within-one-week? [time]
      (->> 7
           time/days
           (time/after (time/now))
           (time/before? time))) 

(defn some-fn []
  (let [weeks (filter starts-within-one-week? sorted-weeks )]))

There were other fixes as well, but this was the major one to help complete this whole idea.

Weekly, I am learning about you.

Best,

Merl