Skip to content

Instantly share code, notes, and snippets.

View Tinomuchenje's full-sized avatar
🏠
Working from home

TinoJoel Muchenje Tinomuchenje

🏠
Working from home
View GitHub Profile
@Tinomuchenje
Tinomuchenje / Program,cs
Created August 30, 2023 07:40
Converting Datatable items to a csv format
using System;
using System.Data;
using System.IO;
using System.Text;
public static class Extensions
{
public static string ToCSV(this DataTable table)
{
var result = new StringBuilder();
@Tinomuchenje
Tinomuchenje / businesshourscalculation.ts
Last active November 1, 2022 07:49
Calculate business hours excluding weekends and holidays formatted to nearest 30 mins. Typescript || Javascript
let startDate = new Date('2022/12/25 8:00');
let endDate = new Date('2022/12/27 9:30');
function calculateBusinessDays(startDate, endDate) {
var minutesWorked = 0;
var holidays = ['2022/12/25', '2022/12/26']
var workHoursStart = 8;
var workHoursEnd = 17;
@Tinomuchenje
Tinomuchenje / .gitignore
Created May 17, 2021 18:36 — forked from pingrishabh/.gitignore
Standardised gitignore for your Flutter apps & Dart projects
### Flutter Generated
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
@Tinomuchenje
Tinomuchenje / gist-test
Created April 21, 2021 21:37
First gist to test
Creating my first gist.