2023年10月27日 星期五

delphi now today weekday isoday = (dayofweek + 5) mod 7 + 1

https://docwiki.embarcadero.com/CodeExamples/Sydney/en/DayOfWeek_(Delphi)
https://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.DayOfWeek
http://www.delphibasics.co.uk/RTL.php?Name=DayOfTheWeek
https://en.wikipedia.org/wiki/Leap_year
https://en.wikipedia.org/wiki/Leap_week_calendar
https://github.com/akshayvadher/leap-years-tdd
https://github.com/stdlib-js/assert-is-leap-year
https://github.com/search?q=leap+language%3APascal+&type=repositories
https://github.com/search?q=leap+calendar+language%3APascal+&type=code
delphi today weekday leap calendar
https://www.delphibasics.co.uk/Method.php?NameSpace=System.Globalization&Class=Calendar&Type=Class&Method=GetDayOfWeek
today weekday leap calendar GetDayOfWeek libraries easiest method  calculating
Algorithms for Calculating Day of Week
https://calendars.fandom.com/wiki/Calculating_the_day_of_the_week
https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week
https://learn.microsoft.com/zh-tw/dotnet/api/system.globalization.calendarweekrule?view=net-7.0
https://stackoverflow.com/questions/71269276/same-dayofweek-for-a-given-year-in-delphi
 isoday = (dayofweek + 5) mod 7 + 1

delphi today weekday leap calendar  System Globalization  today weekday leap calendar GetDayOfWeek libraries easiest method  calculating Algorithms for Calculating Day of Week calendars Calculating

http://www.delphigroups.info/2/5b/83334.html
Warning : ISO-8601 calls for Monday=1, Sunday=7. ISOday = (DayOfWeek+6) mod 7. -- ? John Stockton, Surrey, UK. j.

can also be usefull:

var
  FirstWeekDay: Integer = 2; { first day of week
    2 : monday (DIN 1355) }
  FirstWeekDate: Integer = 4; { date in first week
    1 : year starts on Jan 1st
    4 : first "4-day-week" (DIN 1355)
    7 : first complete week }

{ Returns date of first day of week }
function WeekToDate(AWeek, AYear: Integer): TDateTime;
begin
  Result := EncodeDate(AYear, 1, FirstWeekDate);
  Result := Result + (AWeek - 1) * 7 - ((DayOfWeek(Result) + (7 -
FirstWeekDay)) mod 7);
end;

{ Returns no. of week and year the week belongs to }
procedure DateToWeek(ADate: TDateTime; var AWeek, AYear: Integer);
var
  Month, Day: Word;
begin
  ADate := ADate - ((DayOfWeek(ADate) - FirstWeekDay + 7) mod 7) + 7 -
FirstWeekDate;
  DecodeDate(ADate, AYear, Month, Day);
  AWeek := (Trunc(ADate - EncodeDate(AYear, 1, 1)) div 7) + 1;
end; 


TASClient/ESBDates.pas at master · spring-archive ...https://github.com › spring-archive › TASClient › blob  Lobby Client for Windows written in Delphi. Contribute to spring-archive/TASClient development by creating an account on GitHub.

JclDateTime.pas  https://github.com › source › common The result is an integer between // 1 and 7, corresponding to Sunday through Saturday. ISODayOfWeek on the other hand returns an integer // between 1 and 7 ...

dayofweek · GitHub Topics https://github.com › topics › dayofweek Python function accepts mm/dd/yyyy and outputs day of week as string and integer. Any date since 1600. python calendar dates gregorian-calendar gregorian-date ...
 
GpDelphiUnits/src/GpTimezone.pas at master  https://github.com › gabr42 › blob › Gp... weekday (0 to 6, 0 = Sunday), and using a wDay value in the range 1 through 5 to select the correct day in the month. Year parameter is used to specify year ...

Calculate the local day of the week from Unix time and time ...https://gist.github.com › ...Calculate the local day of the week from Unix time and time zone offset - dayofweek.c.
 
SQL Server: DateTime.DayOfWeek translation · Issue #10404  https://github.com › aspnet › issues  Currently there is no translation for DayOfWeek property of DateTime value, it evaluates on client. When using in complex queries it can ...
 
filter on day of week · Issue #624  https://github.com › npgsql › issue try to filter a datetime field on the day of the week. For example (if I only want mondays): DayOfWeek d = DayOfWeek.Monday; filter.
 
ISOWeek.cs  https://github.com › src › Globalization... DayOfWeek) + 10) / 7; } // Day of week in ISO is represented by an integer from 1 through 7, beginning with Monday and ending with Sunday. // This matches ...

GpDelphiUnits/src/GpStuff.pas at master - gabr42 https://github.com › gabr42 › GpDelphiUnits › blob › G...A collection of my open sourced Delphi units. Contribute to gabr42/GpDelphiUnits development by creating an account on GitHub.
https://github.com/gabr42/GpDelphiUnits/tree/master

Calendar Globalization DayOfWeek https://learn.microsoft.com/zh-tw/dotnet/api/system.globalization.calendar.getdayofweek?view=net-7.0

WeekDay Get Current Week (VB.NET)  Private Function GetCurrentWeek() As String  Dim dat As DateTime = DateTime.Now() Dim culInfo As New CultureInfo(“zh-TW") Dim cal As Calendar = culInfo.Calendar() Dim week As Integer = cal.GetWeekOfYear(dat, CalendarWeekRule.FirstDay, DayOfWeek.Sunday) Return week.ToString(“00″)


algorithms date time
https://www.researchgate.net/publication/316558298_Date_Algorithms
Gregorian Calendar Julian date  Julian Day
https://liuzhenglaichn.gitbook.io/algorithm/date
https://en.wikibooks.org/wiki/Algorithm_Implementation/Date_and_time/Conversion_of_a_Gregorian_date_to_an_International_Fixed_Calendar_date
https://copyprogramming.com/t/algorithm-to-determine-if-a-given-datetime#google_vignette
https://www.boost.org/doc/libs/1_54_0/doc/html/date_time/gregorian.html
https://learn.microsoft.com/en-us/analysis-services/data-mining/microsoft-time-series-algorithm?view=asallproducts-allversions

NOAA’s National Geodetic Survey (NGS) provides the framework Existing algorithms and source code available
https://geodesy.noaa.gov/gps-toolbox/exist.htm

NTP NTC 熱敏 電阻 Positive Temperature Coefficient Negative positive temperature coefficient resistor

https://zh.wikipedia.org/wiki/%E7%83%AD%E6%95%8F%E7%94%B5%E9%98%BB
https://en.wikipedia.org/wiki/Thermistor
https://zh.wikipedia.org/wiki/%E6%B9%A7%E6%B5%AA%E9%9B%BB%E6%B5%81%E9%99%90%E5%88%B6%E5%99%A8
https://en.wikipedia.org/wiki/Inrush_current_limiter
負溫度係數Negative Temperature Coefficient (NTC)
正溫度係數(PTC,Positive Temperature Coefficient)
Positive Temperature Coefficient (PTC)
臨界溫度熱敏電阻CTR,Critical Temperature Resistance)

main distribution frame  Overvoltage protection 

MOV based modular solid-state switches and a concentrated
壓敏電阻Metal Oxide Varistors  MOV Metal Voltage Dependent Resistor

https://embeddedschool.in/list-types-of-protection-devices/

tvs over Voltage  protection component
tvs over Voltage  protection

Over-Voltage and Over-Current Protection Explained over Voltage  protection component Components such as MOV, GDT, SPG (Spark Gap Protectors) and TSS (Thyristor Surge Suppressors) serve as the primary form of protection against overvoltage. TVS and ESD

Optical spectrometer Spectrometry diffraction grating VHP grating Prism PGP spherical Conical surface Cone LENs Monochromator

 diffraction grating VHP grating Prism PGP spherical

The Optics of Spectrometry: A Guide to Spectroscopy Gratings

Direct-vision, dispersing prism-grating-prism (PGP) spectrograph used... | Download Scientific Diagram 

https://www.avantes.com/support/theoretical-background/introduction-to-spectrometers/

https://support.zemax.com/hc/zh-cn/articles/1500005578762-How-to-build-a-spectrometer-theory

Conical surface Cone 

Optical  Conical surface Cone grating Conical surface Cone  IR filter  Grating Equation

Optimization and Performance Evaluation of Apodization Function for Fiber Bragg Grating as Vital Sign Sensor | SpringerLink

Optical  Cone grating filter Optical filtering