Package detail

is-almost-week-end

Lauwed314ISC1.0.3

Will tell you if this is almost the week-end

weekend, week-end, everybody, is

readme

is-almost-weekend 🎉

NPM Version Downloads License: MIT

Because determining if it's almost the weekend is an existential question that deserves its own NPM package.

Created during CAP48H 2025 🎗️ - Because even charity marathons need useless code.

🤔 Why?

Have you ever wondered if there's a package to know if it's almost the weekend? NO? Well, now you have.

This revolutionary package solves the millennial problem: "Is it Tuesday?"

Because as everyone knows, Tuesday is almost the weekend. Flawless logic.

📦 Installation

npm install is-almost-weekend

Add 13kb of dependencies to your project for a feature you could code in 2 lines. You're worth it.

🚀 Usage

import { isAlmostWeekend } from 'is-almost-weekend';

// Basic usage
isAlmostWeekend(new Date(2025, 0, 7)); // "💕 It is almost the week-end 💕"
isAlmostWeekend(new Date(2025, 0, 8)); // "The week-end is not even near 😣"

// With strings
isAlmostWeekend("2025-01-07"); // "💕 It is almost the week-end 💕"
isAlmostWeekend("Tuesday"); // "💕 It is almost the week-end 💕"
isAlmostWeekend("Mardi"); // "💕 It is almost the week-end 💕"

// With anything else
isAlmostWeekend("banana"); // "Probably"

🎯 API

isAlmostWeekend(input, isImage)

Determines with scientific precision if it's almost the weekend.

Parameters

  • input (string | number | Date): A date, or something that looks like a date, or really anything
  • isImage (boolean): A completely useless parameter that does nothing. But it's there. Because.

Returns

  • "💕 It is almost the week-end 💕" - Congratulations, it's Tuesday!
  • "The week-end is not even near 😣" - Sorry, it's another day of the week
  • "Probably" - We don't know what you passed, but let's stay optimistic

🧠 The Logic™

  1. If it's Tuesday → It's almost the weekend ✨
  2. If it's not Tuesday → The weekend is far away 😭
  3. If we don't understand what you sent → "Probably" (the universal answer)

🎨 Features

✅ Detects Tuesday with remarkable precision
✅ International support: "Tuesday" AND "Mardi"
✅ Elaborate ASCII art in the comments
✅ Mysterious isImage parameter that does absolutely nothing
✅ Sophisticated error handling: "Probably"
✅ 100% useless but functional code

⚠️ Known Limitations

  • Only considers Tuesday as "almost the weekend"
  • Wednesday, Thursday, and Friday are apparently not close to the weekend
  • The isImage parameter is decorative
  • Uses date-fns to do what a new Date().getDay() === 2 would do

🤓 Fun Facts

  • Package weight: Heavier than necessary
  • Complexity: Overrated
  • Usefulness: Questionable
  • ASCII art quality: Priceless

📝 License

MIT - Because even troll code deserves to be free.

🙏 Contributing

PRs are welcome, especially if they add even more unnecessary complexity.

Ideas for next versions:

  • Add an isVideo parameter that also does nothing
  • Consider Monday as "almost Tuesday, therefore almost the weekend"
  • Rewrite in TypeScript with 47 generic types
  • Add a jQuery dependency, for old times' sake

💝 Support

Created with ❤️ and way too much free time during CAP48H 2025.

If this package made you laugh (or cry), consider donating to a real charity cause.


Disclaimer: This package is a joke. If you use it in production, we can't help you anymore. 🫡