Closed amitgaru2 closed 3 years ago
Hello dxillar, Are you working on it?
@neeket Not started yet. just keeping track of it.
@dxillar I have one question regarding database (postgres) column for storing bs date. What datatype do you suggest for storing bs date in database?
@neeket I would recommend storing using Python's standard date module itself.. After fetching from database, convert it to BS date using the library. And before inserting any Nepali BS date, convert it to Python standard date then store..
This way you can preserve filtering behavior, as you can convert BS to AD before applying filter then again convert result date to BS to display to the user.
I hope you got it.
I believe you mean that we don't need to save BS date in database but rather save corresponding AD date. But would converting be good idea if there are thousands or lacs of rows and there is join of 4 or more tables?
What kind of enhancement & help do you need in this project?
That's a pretty good point.
What I suggest now is create a separate table where it contains AD & its corresponding BS date & create index on that AD date - if your application is too much of data intensive. Later whenever you are fetching data just join any table having AD with this new table on AD column so that you can get BS date.
AD | BS |
---|---|
2020-11-05 | 2020-07-20 |
Store BS in string with the format you require.
Also why I recommended not directly storing BS as string field instead of AD as you suggested earlier is because, you won't be able to do the filters like date greater/lesser than, date between, & any other date related db queries ( if there exists more ).
The enhancement is mentioned in the title of this issue & there's a description too.
* support for days name ( like आइतबार सोमबार मंगलबार बुधवार बिहिबार शुक्रबार शनिबार ) * support for days & years digits ( like ०१२३४५६७८९, २०७५, २०७६, २०७७, ... )
Hi. this would be great!. Getting support for days name, comma-separated numbers in Unicode.