{"id":96,"date":"2007-08-28T16:36:00","date_gmt":"2007-08-28T16:36:00","guid":{"rendered":"http:\/\/www.webmundi.com\/?p=96"},"modified":"2019-06-13T11:23:11","modified_gmt":"2019-06-13T14:23:11","slug":"quantos-fins-de-semana-ja-se-passaram-no-corrente-ano","status":"publish","type":"post","link":"http:\/\/localhost\/cmswebmundicom\/desenvolvimento-de-sistemas\/delphi\/quantos-fins-de-semana-ja-se-passaram-no-corrente-ano\/","title":{"rendered":"Quantos fins de semana j\u00e1 se passaram no corrente ano"},"content":{"rendered":"
Quantos fins de semana j\u00e1 se passaram no corrente ano<\/p>\n
<\/p>\n
function WeekNum(const TDT:TDateTime) : Word;
\nvar
\nY,M,D:Word;
\ndtTmp:TDateTime;
\nbegin
\nDecodeDate(TDT,Y,M,D);
\ndtTmp := EnCodeDate(Y,1,1);
\nResult := (Trunc(TDT-dtTmp)+(DayOfWeek(dtTmp)-1)) DIV 7;
\nif Result = 0 then
\nbegin
\nResult := 51
\nend
\nelse
\nbegin
\nResult := Result-1;
\nend;
\nEnd;<\/p>\n","protected":false},"excerpt":{"rendered":"
Quantos fins de semana j\u00e1 se passaram no corrente ano function WeekNum(const TDT:TDateTime) : Word; var Y,M,D:Word; dtTmp:TDateTime; begin…<\/p>\n","protected":false},"author":2,"featured_media":8411,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[9,13],"tags":[27,28,14],"class_list":["post-96","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-delphi","category-desenvolvimento-de-sistemas","tag-delphi","tag-desenvolvimento-de-sistemas","tag-programacao"],"yoast_head":"\n