@@ -124,9 +124,9 @@ class NepaliDate
124124 2 => 'Monday ' ,
125125 3 => 'Tuesday ' ,
126126 4 => 'Wednesday ' ,
127- 5 => 'Thurday ' ,
127+ 5 => 'Thursday ' ,
128128 6 => 'Friday ' ,
129- 7 => 'Saturrday ' ,
129+ 7 => 'Saturday ' ,
130130 ];
131131
132132 private $ monthsInNepali = [
@@ -190,24 +190,24 @@ public function create(Carbon $date)
190190
191191 public function toBS ()
192192 {
193- return $ this ->nepaliYear . '- ' . $ this ->nepaliMonth . '- ' . $ this ->nepaliDay ;
193+ return $ this ->nepaliYear . '- ' . sprintf ( ' %02d ' , $ this ->nepaliMonth ) . '- ' . $ this ->nepaliDay ;
194194 }
195195
196196 public function toFormattedBSDate ()
197197 {
198- return $ this ->nepaliDay . ' ' .
199- $ this ->formattedBSMonth ($ this ->nepaliMonth ). ' ' .
200- $ this ->nepaliYear . ', ' .
201- ' ' .
198+ return $ this ->nepaliDay . ' ' .
199+ $ this ->formattedBSMonth ($ this ->nepaliMonth ) . ' ' .
200+ $ this ->nepaliYear . ', ' .
201+ ' ' .
202202 $ this ->formattedBSDateOfWeek ($ this ->dayOfWeek );
203203 }
204204
205205 public function toFormattedNepaliDate ()
206206 {
207- return $ this ->formattedNepaliNumber ($ this ->nepaliDay ). ' ' .
208- $ this ->formattedNepaliMonth ($ this ->nepaliMonth ). ' ' .
209- $ this ->formattedNepaliNumber ($ this ->nepaliYear ). ', ' .
210- ' ' .
207+ return $ this ->formattedNepaliNumber ($ this ->nepaliDay ) . ' ' .
208+ $ this ->formattedNepaliMonth ($ this ->nepaliMonth ) . ' ' .
209+ $ this ->formattedNepaliNumber ($ this ->nepaliYear ) . ', ' .
210+ ' ' .
211211 $ this ->formattedNepaliDateOfWeek ($ this ->dayOfWeek );
212212 }
213213
@@ -225,7 +225,7 @@ public function toDetailBS()
225225 {
226226 $ bs_array = $ this ->toBSArray ();
227227 $ to_detail_bs = null ;
228- if (! is_null ($ bs_array )) {
228+ if (!is_null ($ bs_array )) {
229229 if (is_array ($ bs_array )) {
230230 if (count ($ bs_array ) > 0 ) {
231231 $ to_detail_bs = json_decode (json_encode ($ bs_array ));
@@ -238,8 +238,6 @@ public function toDetailBS()
238238
239239 public function toFormattedBSDateArray ()
240240 {
241- $ bsDateArray = $ this ->toBSArray ();
242-
243241 return [
244242 'year ' => $ this ->formattedNepaliNumber ($ this ->nepaliYear ),
245243 'month ' => $ this ->formattedNepaliMonth ($ this ->nepaliMonth ),
0 commit comments