30 lines
830 B
C#
30 lines
830 B
C#
public class CalloutData{
|
|
public string username;
|
|
public string token;
|
|
public string price_at_creation;
|
|
public string price_now;
|
|
public string gains;
|
|
public string addedDate;
|
|
public string ca;
|
|
}
|
|
|
|
|
|
public static class HelperMethods{
|
|
public static DateTime GetNextMonday(DateTime dt){
|
|
// Calculate days until next Monday
|
|
int daysUntilMonday = ((int)DayOfWeek.Monday - (int)dt.DayOfWeek + 7) % 7;
|
|
|
|
// If dt is already Monday, move to the next Monday
|
|
if (daysUntilMonday == 0)
|
|
{
|
|
daysUntilMonday = 7;
|
|
}
|
|
|
|
// Add the calculated days to the current date
|
|
return dt.AddDays(daysUntilMonday);
|
|
}
|
|
|
|
public static DateTime GetNextFirstDay(DateTime dt){
|
|
return new DateTime(dt.Year, dt.Month+1, 1);
|
|
}
|
|
} |