After reviewing my original code, I realized the root cause of the issue was a missing !return
statement and the critical !endfunction
declaration. These were omitted right before the @enduml
tag in my initial implementation. Unfortunately, PlantUML doesn't provide a helpful error message in this case, which made debugging a bit challenging. It was a good reminder of how tricky it can be to review one's own code objectively.
That said, I’ve resolved the issue! Along the way, I also identified and fixed a related bug: when using %date("YYYY-MM-dd", %now())
, failing to use the correct format string ("yyyy-MM-dd"
) could lead to errors after "2024-12-28". This issue has been addressed in my updated code.
For anyone struggling with converting dates to epoch_time
, the logic isn’t overly complex, but feel free to refer to my solution below.
!include
Usage: GRPlantUMLUtilities Test Cases!endfunction
: Problematic GistHopefully, this helps others avoid similar pitfalls!