• Login
Community
  • Login

create a diary calendar for 2022

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 1.9k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    ticamehcs
    last edited by Dec 23, 2021, 11:00 AM

    Can I create a diary calendar for 2022 containing each month, week and day?
    Making it into a simple .txt file.
    Is it possible to input year-month-day
    and timer values as below. Two lines for each day.
    Also make possible to change values of timer when needed.
    Maybe a regular expression for each month day etc. that creates a text file.
    Any input on this is highly appreciated!

    Thanks and best regards, stay safe and healthy,

    Example like this for january 2022

    2022-01-01 [Day 1] [Week 1]
    Timer 12:00 --> 16:00 = 4 hours 
    
    2022-01-02 [Day 2]
    Timer 12:00 --> 16:00 = 4 hours 
    
    2022-01-03 [Day 3]
    Timer 12:00 --> 16:00 = 4 hours 
    
    2022-01-04 [Day 4]
    Timer 12:00 --> 16:00 = 4 hours 
    
    2022-01-05 [Day 5]
    Timer 12:00 --> 16:00 = 4 hours 
    
    2022-01-06 [Day 6]
    Timer 12:00 --> 16:00 = 4 hours 
    
    2022-01-07 [Day 7]
    Timer 12:00 --> 16:00 = 4 hours 
    
    2022-01-08 [Day 8] [Week 2]
    Timer 12:00 --> 16:00 = 4 hours
    

    …and so on…

    A A 2 Replies Last reply Dec 23, 2021, 1:00 PM Reply Quote 0
    • A
      Alan Kilborn @ticamehcs
      last edited by Dec 23, 2021, 1:00 PM

      @ticamehcs said in create a diary calendar for 2022:

      Can I create a diary calendar for 2022 containing each month, week and day?

      Yes, but use some sort or programming language to do this.

      Maybe a regular expression for each month day etc. that creates a text file.

      No.

      This question really is off-topic for a Notepad++ forum, but I suppose you didn’t know that until you asked and received a response.

      1 Reply Last reply Reply Quote 0
      • A
        astrosofista @ticamehcs
        last edited by Dec 23, 2021, 8:05 PM

        @ticamehcs

        As far as I know, there is no plugin that can do what you want. Anyway, here’s a quick AutoHotkey script to get you started. Install AutoHotkey if you don’t have it on your computer, run the script and the whole daily calendar, as described above, will be placed on the clipboard, ready to be pasted into a Notepad++ tab.

        vDate := 20211231
        vWeek := 0
        vTimer := "Timer 12:00 --> 16:00 = 4 hours`n`n"
        vCalendar := ""
        
        Loop, 365 {
        	vDate += 1, days
        	FormatTime, vDate2, % vDate, yyyy-MM-dd
        	if (Mod(A_Index, 7) = 1) {
        		vWeek++
        		vCalendar .= Format("{} [Day {}] [Week {}]`n{}", vDate2, A_Index, vWeek, vTimer)
        	} else
        		vCalendar .= Format("{} [Day {}]`n{}", vDate2, A_Index, vTimer)
        	
        }
        
        MsgBox, % Clipboard := vCalendar
        return
        

        From your words, I understand that the Timer line requires some adjustments, which you could do by adapting the script, rewriting it in your preferred programming language, or using Notepad++'s superb search and replace features, either in normal or regex mode.

        Hope this helps.

        A 1 Reply Last reply Dec 23, 2021, 8:11 PM Reply Quote 0
        • A
          Alan Kilborn @astrosofista
          last edited by Alan Kilborn Dec 23, 2021, 8:12 PM Dec 23, 2021, 8:11 PM

          @astrosofista

          Off-topic. Downvoting.
          Responding to off-topic posts only encourages more people to use this forum as a free for all to ask any question they like, adding to the clutter for those of us interested in only Notepad++ topics here.
          Please don’t claim it is “on topic” because it generates data that can be pasted into a Notepad++ tab.
          Surely if you are good at AutoHotKey you can go over to their forum and write as many scripts for people as you like.

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors