Hello guys,
I need some help in figuring out how can I convert the current month into the amount of days it has with commands without having to like a database thing or whatever.
You will probably need some kind of code…check the forum for discussion on custom calendars to find the html code used for the calendar…that may be something.
I tried fiddling with the bubble built in date functions
But couldn’t find something that would allow you to change the date to ( last of month )…instead you have to manually enter a number,
So I believe you could have issues when its 28 or 29
If you go through the custom calendar thread, I believe one part of it focuses on using list of numbers and a couple other plugins that enable you to create a list of dates…that portion could be very beneficial, as you would create a list of dates for the current month and just count the number of entries.
Thanks mate. I got one more question and you may be able to answer it. So say you have a date range (27Nov-4Dec) and I want bubble to be able to recognize within that date range how many days are in November and how many days are in December. Do you have any clue on how to achieve this?
To calculate days in month take current month + 1 month to it, set day to 1 then -1day from it that will move you to the last day of the current month - then extract day and you will have 31 for Dec.
Example
Current/Date time 5th Dec + Month = 5th Jan, Set day to 1st = 1st Jan - 1day = 31 Dec
Very long winded but that’s the way to do it in Bubble currently
Simon
meaning that you want to see that there are 3 days in November and 4 in December? The plugin @AliFarahat posted about is the plugin I was referring to, which I believe I first found on the custom calendar thread.
Using that plugin you can create a way to set the date range and count how many days are in that range, as well as save or store using custom states all those dates individually or even as a list. Once you achieve that you just need to create a workflow event or conditional formatting to do a search of the list of dates with constraint for month = November and count as well as another that has constraint = December and then count.
Check out the plugin, play around a bit with it and then you’d be able to set something up to do what you are looking for.
Thanks for the input mate. Do you have like an example where I can see what you re explaining?
Thanks
This is cause I am trying to achieve occupation rates for certain object, by month
Sorry I don’t…but if you give it a go, I am sure after reading through the forum posts on custom calendar and some time playing around with the different plugins used, such as list of dates, you’d be able to put it together.
The conceptualization of how to achieve the task is all I am able to offer I’m afraid.