scheduling-text-generator
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

日程調整ができるサービス調整さんの候補日程用テキストを生成するためのライブラリです。

サンプル

const {
  generateSchedulingText,
  date2Schedule,
  dateRange,
} = require("scheduling-text-generator");

const startDate = new Date(2022, 10, 1, 19);
const endDate = new Date(2022, 10, 5);
const overrideTexts = ["19:00~", "20:00~", "21:00~"];

const schedules = dateRange(startDate, endDate)
  .map((date) => overrideTexts.map((text) => date2Schedule(date, text)))
  .flatMap((v) => v);
console.log(generateSchedulingText(schedules));

出力

11/2 20:00~
11/2 21:00~
11/3 19:00~
11/3 20:00~
11/3 21:00~
11/4 19:00~
11/4 20:00~
11/4 21:00~
11/5 19:00~
11/5 20:00~
11/5 21:00~

Readme

Keywords

none

Package Sidebar

Install

npm i scheduling-text-generator

Weekly Downloads

1

Version

0.3.0

License

ISC

Unpacked Size

93.7 kB

Total Files

31

Last publish

Collaborators

  • rhenium_nv