algorithmic modeling for Rhino
Hallo :),
I have the following questions, if someone can further help me would be grateful (Attached file is part of my definition):
a - How can i convert the path number to a specific number: in my example, i want 0, 1, 2, ... to be converted to 156.0, 126.0, 96.0, ...
b- How can i convert the numbers 156.0, 126.0, 96.0...(which are Julian Date Calendar) to normal dates: 156.0 is June 5th, 126.0 is may 6th, 96.0 is April 6th...etc.
thank you in advance!
nass
Tags:
For part 1 see attached file. It's most likely not the best solution though.
For part 2 I suspect you'll need a script that also takes into account leap years.
Maybe Geco has some dates components, though I don't have it installed at the moment.
Nicely done Marios.
mmm, ok i will try to check the formula from wikipedia to convert the values to date...
attached is a table of julian date
thx though
Ty,
I am always too lazy and try to use less components.
:)
Can i replace a Branch number by text, or string?
I mean, part 1 works for me, but I need now to change the branches to string/text (i.e date)
for instance, what you have in your picture: 66 to March 7, 96 to April 06...
thx !
No, you can't do that. the GH_path class can only take an Integer as an argument.
There's a built-in class in DotNet that handles date time functions. I'm pretty sure David is implementing native date + time components for the next release of GH, but in the meantime, this script will convert a day of year and a year into a full date in a couple formats.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by