public DateTime addDays(DateTime dateTime, int addingDays) { // calendar 우선 디폴트 QLNet.Calendar calendar = new SouthKorea(); return(calendar.advance(dateTime, addingDays, TimeUnit.Days)); //DateTime addedDateTime = dateTime.AddDays(addingDays); }
//public ObservableCollection<DateTime> dates(int addingDays = 0) public void genDates(int addingDays = 0) { this.dates_.Clear(); //Period tenor = new Period(this.tenor_); QLNet.Calendar calendar = new SouthKorea(); Period tenor = new Period(this.frequencyEnum_); BusinessDayConvention bdc = this.businessDayConvEnum_; DateGeneration.Rule dateGen = this.dateGenEnum_; try { Schedule schedule = new Schedule(new Date(initialDate_), new Date(endDate_), tenor, calendar, bdc, bdc, dateGen, false); List <Date> ql_d = schedule.dates(); for (int i = 0; i < ql_d.Count; i++) { this.dates_.Add(ql_d[i]); } } catch (Exception) { OutputLogViewModel.addResult("schedule gen error"); } //test //for (int i = 0; i < 6; i++) //{ // this.dates_.Add(new DateTime()); //} //this.dates_ = d; //return d; }
public SouthKorea(SouthKorea.Market m) : this(NQuantLibcPINVOKE.new_SouthKorea__SWIG_0((int)m), true) { if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SouthKorea obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SouthKorea obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }