Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Skript TimeSpan Parsing

Open EquipableMC opened this issue 1 year ago • 4 comments

Suggestion

Since you can do and allow "1 day" to be parsed as a timespan, you should be able to do 1d as well.

Why?

This should be possible because of many reasons. People always shorthand 1d to be 1 day, so it would make sense if you could do 1 day.

Other

Please mark this as up to debate as I want to see other peoples opinion on this.

Agreement

  • [X] I have read the guidelines above and affirm I am following them with this suggestion.

EquipableMC avatar Jan 13 '24 22:01 EquipableMC

I think this would make sense to add for the command parse context, but i don't think you should be allowed to use the shorthand in code (set {_one day} to 1d).

Pikachu920 avatar Jan 13 '24 22:01 Pikachu920

I think this would make sense to add for the command parse context, but i don't think you should be allowed to use the shorthand in code (set {_one day} to 1d).

Especially since the d suffix is commonly used to denote a double (as I think it used to be in Minecraft's printed NBT)

Moderocky avatar Jan 14 '24 13:01 Moderocky

I mainly just wanted it for command parse context, I can see the issues with variables and all that other stuff that does not have to do with command parse

EquipableMC avatar Jan 14 '24 13:01 EquipableMC

Currently this is supported using clock format timespan (HH:MM:SS[.ms])

command /test5 <timespan>:
	trigger:
		broadcast arg-1

image

Though, this is still a valid suggestion. Suggested format 1y2M3w4d5h7m7s8ms (month maybe M or mo) only in command parse context

AyhamAl-Ali avatar Jan 21 '24 22:01 AyhamAl-Ali

merged in #7001

Efnilite avatar Nov 01 '24 22:11 Efnilite