Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tavisca-ssharma
Copy link


for(int i = 0; i<exactPostTime.Length; i++)
{
string[] hour_min_sec = exactPostTime[i].Split(":");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not use snake casing, use camel casing for local variable names

Array.Sort(currentTime);
return currentTime[(exactPostTime.Length-1)];

throw new NotImplementedException();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this, it was only to indicate that code should be written here

{
string minutes = showPostTime[i].Split(" ")[0];
TimeSpan tspan = new TimeSpan(0, Int32.Parse(minutes), 0);
currentTime[i] = dateTime.Add(tspan).ToString().Split(" ")[1];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

directly using ToString("HH:mm:ss") will save you further split

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants