Youtube Live Clock

show duration for livestreams and present time for archives

< Feedback on Youtube Live Clock

Review: Good - script works

§
Posted: 02-11-2022

Hello,

Your script works very well.

I'm French and I just like to know how to see the date like this please : 8/10/2022 or Saturday 8/10/2022 for live archive.

Thank you for your answer.

Google Chrome Browser with Tampermonkey

DerekHuangTác giả
§
Posted: 03-11-2022

Thanks for your reply!
You can change the date format by changing the FORMAT's value in line 14 in version 1.5.0 now.
Please tell me if you have any question!

§
Posted: 03-11-2022

Hello,

I tested the new version of your script and it works very well with all the new dates, I thank you.

It's possible to add this 5th date format also please : Saturday 8/10/2022 -> so that the day is visible entirely.

Thank you again for your answer.

DerekHuangTác giả
§
Posted: 03-11-2022

I think that version 1.5.1 can meet your needs!
Please let me know if you have any other questions!

§
Posted: 03-11-2022

Everything works perfectly.
I hope it will help a lot of people too, because your script is really good and very useful.

Thank you very much for all ;-)


Then these are new ideas for your script if you are interested of course, if you have time and if it's not too difficult for you :
For long and very long live broadcast, add new time durations format with choice like the date format :

- 1 day 0 hours 0 minutes 0 seconds
- 1 day 0h 0m 0s
- 1d 0h 0m 0s

- 1 day 22 hours 50 minutes 2 seconds
- 1 day 22h 50m 2s
- 1d 22h 50m 2s

- 4 weeks 22 hours 50 minutes 2 seconds
- 4 weeks 22h 50m 2s
- 4 wks 22h 50m 2s

- 3 months 22 hours 50 minutes 2 seconds
- 3 months 22h 50m 2s
- 3 mths 22h 50m 2s

- 1 year 22 hours 50 minutes 2 seconds
- 1 year 22h 50m 2s
- 1 yr 22h 50m 2s

- 1 year 3 months 4 weeks 1 day 22 hours 50 minutes 2 seconds
- 1 year 3 months 4 weeks 1 day 22h 50m 2s
- 1yr 3mths 4wks 1d 22h 50m 2s


- 1 day 00:00:00
- 1d 00:00:00

- 1 day 22:50:02
- 1d 22:50:02

- 4 weeks 22:50:02
- 4 wks 22:50:02

- 3 months 22:50:02
- 3 mths 22:50:02

- 1 year 22:50:02
- 1 yr 22:50:02

- 1 year 3 months 4 weeks 1 day 22:50:02
- 1yr 3mths 4wks 1d 22:50:02


What do you think, especially if YouTube can provide these data ?

DerekHuangTác giả
§
Posted: 04-11-2022

Thanks for your feedback and idea!
I think it is feasible, maybe I will work on it if I have time!

§
Posted: 27-11-2024

Hello,

Your script always works very well, but I would like to know what to correctly modify in your script to make this date format work please ?

-> Monday 31 October 2022 06:37:10

Thank you for your answer.

DerekHuangTác giả
§
Posted: 27-11-2024

Updated in Version 1.6.7! Remember to change the FORMAT value in line 14!

DerekHuangTác giả
§
Posted: 27-11-2024
Edited: 27-11-2024

focus on dateFormat func(line 34)

const dateFormat = (presentTime) => {
  const [week, month, day, year, time] = presentTime.toString().split(' ')
  return {
    1: ` (${year}/${abbr.month[month]}/${day} ${time})`,
    2: ` (${abbr.month[month]}/${day}/${year} ${time})`,
    3: ` (${day}/${abbr.month[month]}/${year} ${time})`,
    4: ` (${week} ${day}/${abbr.month[month]}/${year} ${time})`,
    5: ` (${abbr.week[week]} ${day}/${abbr.month[month]}/${year} ${time})`,
    6: ` (${abbr.week[week]} ${day} ${abbr.monthFull[month]} ${year} ${time})`
  } [FORMAT]
}

presentTime will be like Wed Nov 27 2024 21:12:12 GMT+0800 (台北標準時間)
Split presentTime by space to get week(Wed), month(Nov), day(27), year(2024), time(21:12:12)
I use abbr(line 26) to store hashmaps for week and month formats to help find the target format.
then return the formatted string like

`(${year}/${abbr.month[month]}/${day} ${time})` //  (2024/11/27 21:12:12)


I'm not sure if I explained it clearly. Tell me if you have any question!

§
Posted: 27-11-2024

Yes, I understand how your script works and thank you so much for all again ;-)

Post reply

Đăng nhập để bình luận