You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
馃 having trouble coding "Birth Yama" number
below is the code....anybody got a clue, please chime in 馃檹
(AI has obvious failed me here 馃ぃ)
/// <summary>/// yama works out to 2 hrs. 24 mts. of our modern time./// It is to be noted that the beginning of the day is/// reckoned from Sun rise to Sun set in Hindu system. Similarly/// night is reckoned from Sun set to Sun rise on the following/// day, thus consisting of 24 hours for one day./// The timings of the five Yamas are the same during day/// and night/// for Pancha Pakshi/// </summary>publicstatic BirthYama BirthYama(TimebirthTime){// Extract the time component from the DateTimeOffsetDateTimeOffsetdto= birthTime.GetLmtDateTimeOffset();TimeSpaninputTime= dto.TimeOfDay;// Parse the start and end timesvarsunriseStd= SunriseTime(birthTime).GetLmtDateTimeOffset();TimeSpanstart= sunriseStd.TimeOfDay;varsunsetStd= SunsetTime(birthTime).GetLmtDateTimeOffset();TimeSpanend= sunsetStd.TimeOfDay;// Calculate the length of each piece//TimeSpan pieceLength = (end - start) / 5;TimeSpanpieceLength= TimeSpan.FromHours(2.4);// Find out which piece the input time falls underfor(inti=0;i<5;i++){TimeSpanyamaStartTime=start+pieceLength*i;TimeSpanyamaEndTime=start+pieceLength*(i+1);if(inputTime >= yamaStartTime&&inputTime <= yamaEndTime){returnnew BirthYama(i+1, yamaStartTime, yamaEndTime);}
Console.WriteLine($"{i+1} -- {yamaStartTime} -- {yamaEndTime}");if(i==4){
Console.WriteLine("last");}}//if reach here than fail!//return new BirthYama(1, new TimeSpan(), new TimeSpan());}
The text was updated successfully, but these errors were encountered:
馃 having trouble coding "Birth Yama" number
below is the code....anybody got a clue, please chime in 馃檹
(AI has obvious failed me here 馃ぃ)
The text was updated successfully, but these errors were encountered: