ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    JS 根据月获取当月的所有天

    Jan 30, 202311 min read
    function getAllDaysInMonth(month, year) {
      const daysInMonth = getDaysInMonth(month, year);
      const allDays = [];
      for (let i = 1; i <= daysInMonth; i++) {
        allDays.push(new Date(year, month - 1, i));
      }
      return allDays;
    }
    
    console.log(getAllDaysInMonth(2, 2021)); 
    // [
    //   Mon Feb 01 2021 00:00:00 GMT+0000 (Coordinated Universal Time),
    //   Tue Feb 02 2021 00:00:00 GMT+0000 (Coordinated Universal Time),
    //   ...
    //   Mon Feb 28 2021 00:00:00 GMT+0000 (Coordinated Universal Time)
    // ]
    
    

    相关文章

    Go 生成 UUID

    该内容描述了如何在Go语言中通过安装依赖`github.com/google/uuid`并使用`uuid.New()`方法生成UUID,其格式为标准UUID字符串。

    Go 基础入门 第一节 变量声明

    本节介绍了Go语言中变量的声明方式,包括单声明、类型推断、简短声明、多变量声明以及匿名变量的使用,强调了变量定义和使用的规则及注意事项。

    重置git 帐号信息

    该命令用于系统级别移除Git的凭证助手。

    在 Nginx 的 proxy_pass 配置中末尾是否有斜杠的区别

    在 Nginx 的 `proxy_pass` 配置中,末尾是否有斜杠(`/`)决定了是否剥离 `location` 匹配的 URI 部分,进而影响如何将请求的 URI 转发给代理服务器。

    VSCO QuantumultX VIP 解锁

    该脚本用于解锁VSCO和1Blocker的会员服务,通过修改请求和响应数据来模拟会员状态,并提供了QuantumultX、Surge4、Loon和Shadowrocket的配置方法。